Last active
August 29, 2015 14:18
-
-
Save tristang/814e7fdedafa429297d5 to your computer and use it in GitHub Desktop.
Tests passing for issue 19042 with patch tristang/rails:require-option-for-counter-cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================== | |
== UN PATCHED ==== | |
================== | |
-- create_table(:posts, {:force=>true}) | |
D, [2015-04-07T21:48:33.198419 #6407] DEBUG -- : (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "comments_count" integer DEFAULT 0) | |
-> 0.0067s | |
-- create_table(:comments, {:force=>true}) | |
D, [2015-04-07T21:48:33.198977 #6407] DEBUG -- : (0.1ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer) | |
-> 0.0005s | |
Run options: --seed 36117 | |
# Running: | |
D, [2015-04-07T21:48:33.222448 #6407] DEBUG -- : (0.1ms) begin transaction | |
D, [2015-04-07T21:48:33.226736 #6407] DEBUG -- : SQL (0.1ms) INSERT INTO "posts" DEFAULT VALUES | |
D, [2015-04-07T21:48:33.227103 #6407] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:48:33.235333 #6407] DEBUG -- : (0.0ms) begin transaction | |
D, [2015-04-07T21:48:33.235884 #6407] DEBUG -- : SQL (0.1ms) INSERT INTO "comments" DEFAULT VALUES | |
D, [2015-04-07T21:48:33.236148 #6407] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:48:33.236300 #6407] DEBUG -- : (0.0ms) begin transaction | |
D, [2015-04-07T21:48:33.238960 #6407] DEBUG -- : SQL (0.1ms) UPDATE "comments" SET "post_id" = ? WHERE "comments"."id" = ? [["post_id", 1], ["id", 1]] | |
D, [2015-04-07T21:48:33.239256 #6407] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:48:33.240041 #6407] DEBUG -- : (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] | |
F | |
Finished in 0.021636s, 46.2200 runs/s, 138.6600 assertions/s. | |
1) Failure: | |
BugTest#test_association_stuff [test.rb:51]: | |
Expected: 0 | |
Actual: 1 | |
1 runs, 3 assertions, 1 failures, 0 errors, 0 skips | |
================== | |
==== PATCHED ===== | |
================== | |
-- create_table(:posts, {:force=>true}) | |
D, [2015-04-07T21:35:59.556319 #3898] DEBUG -- : (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "comments_count" integer DEFAULT 0) | |
-> 0.0070s | |
-- create_table(:comments, {:force=>true}) | |
D, [2015-04-07T21:35:59.556964 #3898] DEBUG -- : (0.1ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer) | |
-> 0.0005s | |
Run options: --seed 27634 | |
# Running: | |
D, [2015-04-07T21:35:59.581072 #3898] DEBUG -- : (0.1ms) begin transaction | |
D, [2015-04-07T21:35:59.585349 #3898] DEBUG -- : SQL (0.1ms) INSERT INTO "posts" DEFAULT VALUES | |
D, [2015-04-07T21:35:59.585739 #3898] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:35:59.594269 #3898] DEBUG -- : (0.1ms) begin transaction | |
D, [2015-04-07T21:35:59.594807 #3898] DEBUG -- : SQL (0.1ms) INSERT INTO "comments" DEFAULT VALUES | |
D, [2015-04-07T21:35:59.595072 #3898] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:35:59.595230 #3898] DEBUG -- : (0.0ms) begin transaction | |
D, [2015-04-07T21:35:59.600976 #3898] DEBUG -- : SQL (0.1ms) UPDATE "comments" SET "post_id" = ? WHERE "comments"."id" = ? [["post_id", 1], ["id", 1]] | |
D, [2015-04-07T21:35:59.601224 #3898] DEBUG -- : (0.0ms) commit transaction | |
D, [2015-04-07T21:35:59.602108 #3898] DEBUG -- : (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] | |
. | |
Finished in 0.025111s, 39.8237 runs/s, 119.4710 assertions/s. | |
1 runs, 3 assertions, 0 failures, 0 errors, 0 skips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment