[1m[36m (1.3ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id" ON "commontator_comments" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.9ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.316185"], ["updated_at", "2014-09-17 00:32:36.316185"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.323681"], ["updated_at", "2014-09-17 00:32:36.323681"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.326025"], ["updated_at", "2014-09-17 00:32:36.326025"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.327354"], ["updated_at", "2014-09-17 00:32:36.327354"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.2ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 6ms (ActiveRecord: 0.3ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.340197"], ["updated_at", "2014-09-17 00:32:36.340197"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.341366"], ["updated_at", "2014-09-17 00:32:36.341366"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.342262"], ["updated_at", "2014-09-17 00:32:36.342262"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.2ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 13ms (ActiveRecord: 0.7ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.363835"], ["updated_at", "2014-09-17 00:32:36.363835"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.365029"], ["updated_at", "2014-09-17 00:32:36.365029"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.365976"], ["updated_at", "2014-09-17 00:32:36.365976"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:36.370762"], ["updated_at", "2014-09-17 00:32:36.378286"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.384337"], ["updated_at", "2014-09-17 00:32:36.384337"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.385631"], ["updated_at", "2014-09-17 00:32:36.385631"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.386606"], ["updated_at", "2014-09-17 00:32:36.386606"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:36.389738"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.390862"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:36.394520"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:36.397111"], ["updated_at", "2014-09-17 00:32:36.398266"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.402005"], ["updated_at", "2014-09-17 00:32:36.402005"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.403856"], ["updated_at", "2014-09-17 00:32:36.403856"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.405307"], ["updated_at", "2014-09-17 00:32:36.405307"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:36.406132"], ["updated_at", "2014-09-17 00:32:36.407079"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:32:36.414202"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.418267"], ["updated_at", "2014-09-17 00:32:36.418267"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.419388"], ["updated_at", "2014-09-17 00:32:36.419388"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.420290"], ["updated_at", "2014-09-17 00:32:36.420290"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:36.420829"], ["updated_at", "2014-09-17 00:32:36.421548"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:36.424226"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:36.425472"], ["updated_at", "2014-09-17 00:32:36.426122"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:36.428392"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.437522"], ["updated_at", "2014-09-17 00:32:36.437522"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.438758"], ["updated_at", "2014-09-17 00:32:36.438758"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 1]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (14.8ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.464818"], ["updated_at", "2014-09-17 00:32:36.464818"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.6ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.466134"], ["updated_at", "2014-09-17 00:32:36.466134"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.467819"], ["updated_at", "2014-09-17 00:32:36.467819"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.474941"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.474941"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.490215"], ["updated_at", "2014-09-17 00:32:36.490215"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.491443"], ["updated_at", "2014-09-17 00:32:36.491443"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.492345"], ["updated_at", "2014-09-17 00:32:36.492345"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.494046"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.494046"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.503953"], ["updated_at", "2014-09-17 00:32:36.503953"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.505161"], ["updated_at", "2014-09-17 00:32:36.505161"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.506091"], ["updated_at", "2014-09-17 00:32:36.506091"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.507747"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.507747"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:36.510696"], ["updated_at", "2014-09-17 00:32:36.511434"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.515647"], ["updated_at", "2014-09-17 00:32:36.515647"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.517480"], ["updated_at", "2014-09-17 00:32:36.517480"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.519023"], ["updated_at", "2014-09-17 00:32:36.519023"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.521380"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.521380"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.525626"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.525626"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-09-17 00:32:36.530714"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.530714"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-09-17 00:32:36.534574"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.534574"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.537656"], ["updated_at", "2014-09-17 00:32:36.537656"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.538904"], ["updated_at", "2014-09-17 00:32:36.538904"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.539798"], ["updated_at", "2014-09-17 00:32:36.539798"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.541382"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.541382"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.548428"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.548428"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.555913"], ["updated_at", "2014-09-17 00:32:36.555913"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.557076"], ["updated_at", "2014-09-17 00:32:36.557076"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.557992"], ["updated_at", "2014-09-17 00:32:36.557992"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.559480"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.559480"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.564027"], ["updated_at", "2014-09-17 00:32:36.564027"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.567520"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.567520"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.571822"], ["updated_at", "2014-09-17 00:32:36.571822"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.572828"], ["updated_at", "2014-09-17 00:32:36.572828"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.573725"], ["updated_at", "2014-09-17 00:32:36.573725"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.575210"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.575210"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.586888"], ["updated_at", "2014-09-17 00:32:36.586888"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.588180"], ["updated_at", "2014-09-17 00:32:36.588180"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.589268"], ["updated_at", "2014-09-17 00:32:36.589268"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.590888"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.590888"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.596261"], ["updated_at", "2014-09-17 00:32:36.596261"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.600510"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.600510"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.606247"], ["updated_at", "2014-09-17 00:32:36.606247"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.608154"], ["updated_at", "2014-09-17 00:32:36.608154"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.609661"], ["updated_at", "2014-09-17 00:32:36.609661"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.612058"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.612058"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.617681"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.629084"], ["updated_at", "2014-09-17 00:32:36.629084"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.630272"], ["updated_at", "2014-09-17 00:32:36.630272"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.631180"], ["updated_at", "2014-09-17 00:32:36.631180"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.632705"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.632705"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.637634') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:32:36.637634"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.638986"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.644290"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.644290"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:36.645892"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.2ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.651089"], ["updated_at", "2014-09-17 00:32:36.651089"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.652269"], ["updated_at", "2014-09-17 00:32:36.652269"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.653187"], ["updated_at", "2014-09-17 00:32:36.653187"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.654823"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.654823"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.658320') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:32:36.658320"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.659198"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.661070"], ["updated_at", "2014-09-17 00:32:36.661070"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.662671"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.662671"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:36.664192"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.666357') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:32:36.666357"], ["editor_id", 2], ["updated_at", "2014-09-17 00:32:36.667249"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-09-17 00:32:36.669368"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.671609') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:32:36.671609"], ["editor_id", 2], ["updated_at", "2014-09-17 00:32:36.672533"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.675131"], ["updated_at", "2014-09-17 00:32:36.675131"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.676208"], ["updated_at", "2014-09-17 00:32:36.676208"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.677136"], ["updated_at", "2014-09-17 00:32:36.677136"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.678752"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.678752"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.679392') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:32:36.679392"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.680204"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 9ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:36.692689"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.696862"], ["updated_at", "2014-09-17 00:32:36.696862"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.697419') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:32:36.697419"], ["editor_id", 2], ["updated_at", "2014-09-17 00:32:36.698283"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.702034"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.702034"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-09-17 00:32:36.703989"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.704490') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:32:36.704490"], ["updated_at", "2014-09-17 00:32:36.705201"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.710273"], ["updated_at", "2014-09-17 00:32:36.710273"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.711349"], ["updated_at", "2014-09-17 00:32:36.711349"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.712291"], ["updated_at", "2014-09-17 00:32:36.712291"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.713878"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.713878"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.714544') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:32:36.714544"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:36.715320"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:36.720359"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.721985"], ["updated_at", "2014-09-17 00:32:36.721985"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.723383"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.723383"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.723979') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:32:36.723979"], ["updated_at", "2014-09-17 00:32:36.724795"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-09-17 00:32:36.727658"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:36.728850') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:32:36.728850"], ["editor_id", 1], ["updated_at", "2014-09-17 00:32:36.729618"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-09-17 00:32:36.732428"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.735551"], ["updated_at", "2014-09-17 00:32:36.735551"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.737189"], ["updated_at", "2014-09-17 00:32:36.737189"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.738699"], ["updated_at", "2014-09-17 00:32:36.738699"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.741034"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.741034"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.751629"], ["updated_at", "2014-09-17 00:32:36.751629"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.7ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.760364"], ["updated_at", "2014-09-17 00:32:36.760364"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.762329"], ["updated_at", "2014-09-17 00:32:36.762329"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.763828"], ["updated_at", "2014-09-17 00:32:36.763828"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.766280"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.766280"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.767526"], ["updated_at", "2014-09-17 00:32:36.767526"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.776469"], ["updated_at", "2014-09-17 00:32:36.776469"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 10ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:32:36.789528"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:32:36.795243"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.800471"], ["updated_at", "2014-09-17 00:32:36.800471"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.802414"], ["updated_at", "2014-09-17 00:32:36.802414"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.803391"], ["updated_at", "2014-09-17 00:32:36.803391"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.805040"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.805040"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.812267"], ["updated_at", "2014-09-17 00:32:36.812267"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.817747"], ["updated_at", "2014-09-17 00:32:36.817747"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.818773"], ["updated_at", "2014-09-17 00:32:36.818773"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.819683"], ["updated_at", "2014-09-17 00:32:36.819683"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.821270"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.821270"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.822127"], ["updated_at", "2014-09-17 00:32:36.822127"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.826392"], ["updated_at", "2014-09-17 00:32:36.826392"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:32:36.840480"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:32:36.846498"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.852614"], ["updated_at", "2014-09-17 00:32:36.852614"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.853869"], ["updated_at", "2014-09-17 00:32:36.853869"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.854817"], ["updated_at", "2014-09-17 00:32:36.854817"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.856544"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.856544"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 1 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:36.858847"], ["updated_at", "2014-09-17 00:32:36.858847"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 1], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.868170"], ["updated_at", "2014-09-17 00:32:36.868170"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.874166"], ["updated_at", "2014-09-17 00:32:36.874166"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.875463"], ["updated_at", "2014-09-17 00:32:36.875463"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.876576"], ["updated_at", "2014-09-17 00:32:36.876576"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.878955"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.878955"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.880450"], ["updated_at", "2014-09-17 00:32:36.880450"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.883060"], ["updated_at", "2014-09-17 00:32:36.883060"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:36.905528"], ["updated_at", "2014-09-17 00:32:36.905528"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.916684"], ["updated_at", "2014-09-17 00:32:36.916684"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.917814"], ["updated_at", "2014-09-17 00:32:36.917814"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.918733"], ["updated_at", "2014-09-17 00:32:36.918733"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:36.920583"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.920583"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.921545"], ["updated_at", "2014-09-17 00:32:36.921545"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.924932"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.924932"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.928125"], ["updated_at", "2014-09-17 00:32:36.928125"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.929225"], ["updated_at", "2014-09-17 00:32:36.929225"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.930247"], ["updated_at", "2014-09-17 00:32:36.930247"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:36.931757"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.931757"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.932629"], ["updated_at", "2014-09-17 00:32:36.932629"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:36.937539"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.937539"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:36.940991"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.940991"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.945781"], ["updated_at", "2014-09-17 00:32:36.945781"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.947076"], ["updated_at", "2014-09-17 00:32:36.947076"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.948358"], ["updated_at", "2014-09-17 00:32:36.948358"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:36.957155"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.957155"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.961959"], ["updated_at", "2014-09-17 00:32:36.961959"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.963064"], ["updated_at", "2014-09-17 00:32:36.963064"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.963987"], ["updated_at", "2014-09-17 00:32:36.963987"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.967464"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.967464"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.972824"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.972824"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:36.977434"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.977434"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.980998"], ["updated_at", "2014-09-17 00:32:36.980998"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.982922"], ["updated_at", "2014-09-17 00:32:36.982922"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.984421"], ["updated_at", "2014-09-17 00:32:36.984421"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:36.987319"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:36.987319"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:36.996660"], ["updated_at", "2014-09-17 00:32:36.996660"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:36.997838"], ["updated_at", "2014-09-17 00:32:36.997838"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:36.998754"], ["updated_at", "2014-09-17 00:32:36.998754"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.001535"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.001535"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.007365"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.007365"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.011912"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.011912"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 3]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.017424"], ["updated_at", "2014-09-17 00:32:37.017424"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.020414"], ["updated_at", "2014-09-17 00:32:37.020414"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.021668"], ["updated_at", "2014-09-17 00:32:37.021668"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.022707"], ["updated_at", "2014-09-17 00:32:37.022707"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.024543"], ["updated_at", "2014-09-17 00:32:37.024543"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.025507"], ["updated_at", "2014-09-17 00:32:37.025507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.026464"], ["updated_at", "2014-09-17 00:32:37.026464"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:37.028067"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.028067"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:37.029465"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.031062"], ["updated_at", "2014-09-17 00:32:37.031062"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.032107"], ["updated_at", "2014-09-17 00:32:37.032107"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.033020"], ["updated_at", "2014-09-17 00:32:37.033020"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:37.033948') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.035209"], ["updated_at", "2014-09-17 00:32:37.035209"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:37.035785"], ["creator_id", 2], ["creator_type", "DummyUser"], ["deleted_at", "2014-09-17 00:32:37.033948"], ["editor_id", 3], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.035785"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:37.037577"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.039266"], ["updated_at", "2014-09-17 00:32:37.039266"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.040541"], ["updated_at", "2014-09-17 00:32:37.040541"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.041567"], ["updated_at", "2014-09-17 00:32:37.041567"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:37.043215"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.043215"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.044757"], ["updated_at", "2014-09-17 00:32:37.044757"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 3], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:37.046063"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.052694"], ["updated_at", "2014-09-17 00:32:37.052694"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.054173"], ["updated_at", "2014-09-17 00:32:37.054173"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.055132"], ["updated_at", "2014-09-17 00:32:37.055132"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.055922"], ["updated_at", "2014-09-17 00:32:37.055922"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:37.058086"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.058086"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.059919"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.059919"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:37.061490"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:37.061490"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (3.1ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 19.2ms Sent mail to Undisclosed Recipients (12.6ms) Date: Tue, 16 Sep 2014 19:32:37 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <5418d6a515b83_c6c3fcfbc82dbf87701a@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #2 posted a comment on DummyModel #2 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Something
Click here to view all comments on DummyModel #2.
[1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.103409"], ["updated_at", "2014-09-17 00:32:37.103409"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.106171"], ["updated_at", "2014-09-17 00:32:37.106171"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.108277"], ["updated_at", "2014-09-17 00:32:37.108277"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:37.109926"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:37.111056"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:32:37.113194"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.114612"], ["updated_at", "2014-09-17 00:32:37.114612"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.116241"], ["updated_at", "2014-09-17 00:32:37.116241"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.117702"], ["updated_at", "2014-09-17 00:32:37.117702"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.2ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:37.121043"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-09-17 00:32:37.121043"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.121043') [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:37.126735"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-09-17 00:32:37.126735"]] [1m[35m (0.9ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.2ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.121043') [["thread_id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:32:37.132427' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.132427') [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.137601"], ["updated_at", "2014-09-17 00:32:37.137601"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.139736"], ["updated_at", "2014-09-17 00:32:37.139736"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.141372"], ["updated_at", "2014-09-17 00:32:37.141372"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 3 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:37.143993"], ["creator_id", 4], ["creator_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-09-17 00:32:37.143993"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 3 [["closed_at", "2014-09-17 00:32:37.145302"], ["closer_id", 4], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:37.146240"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1 [["thread_id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 3[0m [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-09-17 00:32:37.151328"]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.152647"], ["updated_at", "2014-09-17 00:32:37.152647"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 3]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1 [["thread_id", 3]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1[0m [["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.156751"], ["updated_at", "2014-09-17 00:32:37.156751"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.158466"], ["updated_at", "2014-09-17 00:32:37.158466"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.159940"], ["updated_at", "2014-09-17 00:32:37.159940"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.163028"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-09-17 00:32:37.163028"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.164610"], ["updated_at", "2014-09-17 00:32:37.164610"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.167188"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-09-17 00:32:37.167188"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mDummyUser Load (0.2ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 5]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.171595"], ["updated_at", "2014-09-17 00:32:37.171595"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.173399"], ["updated_at", "2014-09-17 00:32:37.173399"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.174898"], ["updated_at", "2014-09-17 00:32:37.174898"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.177727"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-09-17 00:32:37.177727"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.179267"], ["updated_at", "2014-09-17 00:32:37.179267"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:37.181791"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-09-17 00:32:37.181791"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 6]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.184882"], ["updated_at", "2014-09-17 00:32:37.184882"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.186659"], ["updated_at", "2014-09-17 00:32:37.186659"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.188157"], ["updated_at", "2014-09-17 00:32:37.188157"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.189718"], ["updated_at", "2014-09-17 00:32:37.189718"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.191296"], ["updated_at", "2014-09-17 00:32:37.191296"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.192754"], ["updated_at", "2014-09-17 00:32:37.192754"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:37.195335"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:32:37.195335"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:37.197530"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:32:37.197530"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 8]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.200430"], ["updated_at", "2014-09-17 00:32:37.200430"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.202072"], ["updated_at", "2014-09-17 00:32:37.202072"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.203579"], ["updated_at", "2014-09-17 00:32:37.203579"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 9 [["commontable_id", nil], ["updated_at", "2014-09-17 00:32:37.205586"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:37.208214"], ["updated_at", "2014-09-17 00:32:37.208214"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:37.209300"], ["updated_at", "2014-09-17 00:32:37.209300"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:37.210219"], ["updated_at", "2014-09-17 00:32:37.210219"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:37.211730"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:37.211730"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.211730')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:37.214558"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:37.214558"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.211730')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:37.218525"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:37.218525"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.211730')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:32:37.222400' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:37.222400') [["thread_id", 10]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mrollback transaction[0m [1m[36m (1.8ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.029925"], ["updated_at", "2014-09-17 00:32:49.029925"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.046142"], ["updated_at", "2014-09-17 00:32:49.046142"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.048427"], ["updated_at", "2014-09-17 00:32:49.048427"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.049342"], ["updated_at", "2014-09-17 00:32:49.049342"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.065424"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.065424"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.067687"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.067687"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.074722"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.074722"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.0ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 19.2ms Sent mail to Undisclosed Recipients (6.0ms) Date: Tue, 16 Sep 2014 19:32:49 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <5418d6b118a8a_c7d3ffb58c2dbdc913b8@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #1 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #1.
[1m[35m (1.2ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.111750"], ["updated_at", "2014-09-17 00:32:49.111750"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.113841"], ["updated_at", "2014-09-17 00:32:49.113841"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.115278"], ["updated_at", "2014-09-17 00:32:49.115278"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.123602"], ["updated_at", "2014-09-17 00:32:49.123602"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.124757"], ["updated_at", "2014-09-17 00:32:49.124757"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.125686"], ["updated_at", "2014-09-17 00:32:49.125686"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.136505"], ["updated_at", "2014-09-17 00:32:49.136505"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.137520"], ["updated_at", "2014-09-17 00:32:49.137520"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.138407"], ["updated_at", "2014-09-17 00:32:49.138407"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:49.142745"], ["updated_at", "2014-09-17 00:32:49.144018"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.148902"], ["updated_at", "2014-09-17 00:32:49.148902"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.149969"], ["updated_at", "2014-09-17 00:32:49.149969"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.150878"], ["updated_at", "2014-09-17 00:32:49.150878"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:49.152823"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.153582"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:49.156639"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:49.158359"], ["updated_at", "2014-09-17 00:32:49.159054"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.161544"], ["updated_at", "2014-09-17 00:32:49.161544"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.163236"], ["updated_at", "2014-09-17 00:32:49.163236"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.164785"], ["updated_at", "2014-09-17 00:32:49.164785"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:49.165643"], ["updated_at", "2014-09-17 00:32:49.166587"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:32:49.174251"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.185204"], ["updated_at", "2014-09-17 00:32:49.185204"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.186869"], ["updated_at", "2014-09-17 00:32:49.186869"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.188177"], ["updated_at", "2014-09-17 00:32:49.188177"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:49.189346"], ["updated_at", "2014-09-17 00:32:49.190331"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:49.193528"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-09-17 00:32:49.194913"], ["updated_at", "2014-09-17 00:32:49.195477"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:49.197604"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.204391"], ["updated_at", "2014-09-17 00:32:49.204391"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.205690"], ["updated_at", "2014-09-17 00:32:49.205690"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.206658"], ["updated_at", "2014-09-17 00:32:49.206658"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.211146"], ["updated_at", "2014-09-17 00:32:49.211146"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.212244"], ["updated_at", "2014-09-17 00:32:49.212244"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.213126"], ["updated_at", "2014-09-17 00:32:49.213126"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.214904"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.214904"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.216389"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.218003"], ["updated_at", "2014-09-17 00:32:49.218003"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.219087"], ["updated_at", "2014-09-17 00:32:49.219087"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.220060"], ["updated_at", "2014-09-17 00:32:49.220060"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.220946') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.222507"], ["updated_at", "2014-09-17 00:32:49.222507"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.223062"], ["creator_id", 1], ["creator_type", "DummyUser"], ["deleted_at", "2014-09-17 00:32:49.220946"], ["editor_id", 2], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.223062"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:49.224621"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.226177"], ["updated_at", "2014-09-17 00:32:49.226177"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.227235"], ["updated_at", "2014-09-17 00:32:49.227235"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.228153"], ["updated_at", "2014-09-17 00:32:49.228153"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.229653"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.229653"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.231212"], ["updated_at", "2014-09-17 00:32:49.231212"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.232848"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.235794"], ["updated_at", "2014-09-17 00:32:49.235794"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.236856"], ["updated_at", "2014-09-17 00:32:49.236856"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.237742"], ["updated_at", "2014-09-17 00:32:49.237742"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.243736"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.243736"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.248579"], ["updated_at", "2014-09-17 00:32:49.248579"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.249867"], ["updated_at", "2014-09-17 00:32:49.249867"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.250958"], ["updated_at", "2014-09-17 00:32:49.250958"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.255474"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.255474"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.261015"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.261015"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.265730"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.265730"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.269255"], ["updated_at", "2014-09-17 00:32:49.269255"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.271245"], ["updated_at", "2014-09-17 00:32:49.271245"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.273122"], ["updated_at", "2014-09-17 00:32:49.273122"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.276274"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.276274"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.285989"], ["updated_at", "2014-09-17 00:32:49.285989"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.287437"], ["updated_at", "2014-09-17 00:32:49.287437"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.288577"], ["updated_at", "2014-09-17 00:32:49.288577"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.291958"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.291958"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.298807"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.298807"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.303587"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.303587"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.310245"], ["updated_at", "2014-09-17 00:32:49.310245"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.312246"], ["updated_at", "2014-09-17 00:32:49.312246"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.313726"], ["updated_at", "2014-09-17 00:32:49.313726"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.315981"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.315981"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.315981')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.320560"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.320560"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.315981')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.324232"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.324232"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.315981')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:32:49.326781' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.326781') [["thread_id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.332047"], ["updated_at", "2014-09-17 00:32:49.332047"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.337605"], ["updated_at", "2014-09-17 00:32:49.337605"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.338838"], ["updated_at", "2014-09-17 00:32:49.338838"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 1]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (8.4ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.353840"], ["updated_at", "2014-09-17 00:32:49.353840"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.357132"], ["updated_at", "2014-09-17 00:32:49.357132"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.359063"], ["updated_at", "2014-09-17 00:32:49.359063"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.360627"], ["updated_at", "2014-09-17 00:32:49.360627"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.363148"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:32:49.363148"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:32:49.364549"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.365450"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-09-17 00:32:49.370002"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.371383"], ["updated_at", "2014-09-17 00:32:49.371383"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.375654"], ["updated_at", "2014-09-17 00:32:49.375654"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.377381"], ["updated_at", "2014-09-17 00:32:49.377381"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.378871"], ["updated_at", "2014-09-17 00:32:49.378871"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.381691"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-09-17 00:32:49.381691"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.381691') [["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 3 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.386366"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-09-17 00:32:49.386366"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.381691') [["thread_id", 3]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:32:49.390712' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:32:49.390712') [["thread_id", 3]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.395133"], ["updated_at", "2014-09-17 00:32:49.395133"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.397220"], ["updated_at", "2014-09-17 00:32:49.397220"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.398927"], ["updated_at", "2014-09-17 00:32:49.398927"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.400843"], ["updated_at", "2014-09-17 00:32:49.400843"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.402706"], ["updated_at", "2014-09-17 00:32:49.402706"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.404264"], ["updated_at", "2014-09-17 00:32:49.404264"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.407431"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-09-17 00:32:49.407431"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.409215"], ["updated_at", "2014-09-17 00:32:49.409215"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.419618"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-09-17 00:32:49.419618"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 5]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.423994"], ["updated_at", "2014-09-17 00:32:49.423994"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.425775"], ["updated_at", "2014-09-17 00:32:49.425775"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.427307"], ["updated_at", "2014-09-17 00:32:49.427307"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 6 [["closed_at", "2014-09-17 00:32:49.428693"], ["closer_id", 7], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.429577"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 6 [["closed_at", nil], ["updated_at", "2014-09-17 00:32:49.431538"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.432959"], ["updated_at", "2014-09-17 00:32:49.432959"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.434637"], ["updated_at", "2014-09-17 00:32:49.434637"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.436137"], ["updated_at", "2014-09-17 00:32:49.436137"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.439370"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-09-17 00:32:49.439370"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.441061"], ["updated_at", "2014-09-17 00:32:49.441061"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.443764"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-09-17 00:32:49.443764"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.447919"], ["updated_at", "2014-09-17 00:32:49.447919"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.449550"], ["updated_at", "2014-09-17 00:32:49.449550"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.451094"], ["updated_at", "2014-09-17 00:32:49.451094"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.453728"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:32:49.453728"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.456124"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:32:49.456124"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 8]] [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.458956"], ["updated_at", "2014-09-17 00:32:49.458956"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.460589"], ["updated_at", "2014-09-17 00:32:49.460589"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.462115"], ["updated_at", "2014-09-17 00:32:49.462115"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 9 [["commontable_id", nil], ["updated_at", "2014-09-17 00:32:49.463993"]] [1m[36m (0.4ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.467516"], ["updated_at", "2014-09-17 00:32:49.467516"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.468630"], ["updated_at", "2014-09-17 00:32:49.468630"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.469552"], ["updated_at", "2014-09-17 00:32:49.469552"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.471169"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.471169"]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.477168"], ["updated_at", "2014-09-17 00:32:49.477168"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.478517"], ["updated_at", "2014-09-17 00:32:49.478517"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.480148"], ["updated_at", "2014-09-17 00:32:49.480148"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.482644"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.482644"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.492738"], ["updated_at", "2014-09-17 00:32:49.492738"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.494093"], ["updated_at", "2014-09-17 00:32:49.494093"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.495576"], ["updated_at", "2014-09-17 00:32:49.495576"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.498043"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.498043"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-09-17 00:32:49.502095"], ["updated_at", "2014-09-17 00:32:49.503002"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.506939"], ["updated_at", "2014-09-17 00:32:49.506939"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.508067"], ["updated_at", "2014-09-17 00:32:49.508067"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.509441"], ["updated_at", "2014-09-17 00:32:49.509441"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.511443"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.511443"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.514879"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.514879"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-09-17 00:32:49.519076"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.519076"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-09-17 00:32:49.523490"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.523490"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.527132"], ["updated_at", "2014-09-17 00:32:49.527132"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.528439"], ["updated_at", "2014-09-17 00:32:49.528439"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.529579"], ["updated_at", "2014-09-17 00:32:49.529579"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.532031"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.532031"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.541305"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.541305"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.547552"], ["updated_at", "2014-09-17 00:32:49.547552"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.548686"], ["updated_at", "2014-09-17 00:32:49.548686"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.549619"], ["updated_at", "2014-09-17 00:32:49.549619"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.551144"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.551144"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.555819"], ["updated_at", "2014-09-17 00:32:49.555819"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.559682"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.559682"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.564818"], ["updated_at", "2014-09-17 00:32:49.564818"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.566534"], ["updated_at", "2014-09-17 00:32:49.566534"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.567937"], ["updated_at", "2014-09-17 00:32:49.567937"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.570162"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.570162"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.583580"], ["updated_at", "2014-09-17 00:32:49.583580"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.584689"], ["updated_at", "2014-09-17 00:32:49.584689"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.585622"], ["updated_at", "2014-09-17 00:32:49.585622"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.587708"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.587708"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.594928"], ["updated_at", "2014-09-17 00:32:49.594928"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.599141"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.599141"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.604684"], ["updated_at", "2014-09-17 00:32:49.604684"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.606763"], ["updated_at", "2014-09-17 00:32:49.606763"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.608256"], ["updated_at", "2014-09-17 00:32:49.608256"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.610523"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.610523"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.616053"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.628045"], ["updated_at", "2014-09-17 00:32:49.628045"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.629169"], ["updated_at", "2014-09-17 00:32:49.629169"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.630090"], ["updated_at", "2014-09-17 00:32:49.630090"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.631636"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.631636"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.636326') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-09-17 00:32:49.636326"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.637725"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 9ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.649229"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.649229"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:49.650806"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.656207"], ["updated_at", "2014-09-17 00:32:49.656207"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.658091"], ["updated_at", "2014-09-17 00:32:49.658091"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.659660"], ["updated_at", "2014-09-17 00:32:49.659660"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.662083"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.662083"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.666706') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-09-17 00:32:49.666706"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.667851"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.669679"], ["updated_at", "2014-09-17 00:32:49.669679"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.671103"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.671103"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:49.672728"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.674878') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-09-17 00:32:49.674878"], ["editor_id", 13], ["updated_at", "2014-09-17 00:32:49.675807"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-09-17 00:32:49.677941"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.679784') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-09-17 00:32:49.679784"], ["editor_id", 13], ["updated_at", "2014-09-17 00:32:49.680703"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.683902"], ["updated_at", "2014-09-17 00:32:49.683902"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.685778"], ["updated_at", "2014-09-17 00:32:49.685778"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.687315"], ["updated_at", "2014-09-17 00:32:49.687315"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.689695"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.689695"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.690678') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-09-17 00:32:49.690678"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.691847"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:49.699833"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.704419"], ["updated_at", "2014-09-17 00:32:49.704419"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.705091') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-09-17 00:32:49.705091"], ["editor_id", 13], ["updated_at", "2014-09-17 00:32:49.706167"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.710245"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.710245"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-09-17 00:32:49.712098"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.712567') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-09-17 00:32:49.712567"], ["updated_at", "2014-09-17 00:32:49.713308"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.718931"], ["updated_at", "2014-09-17 00:32:49.718931"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.720815"], ["updated_at", "2014-09-17 00:32:49.720815"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.722390"], ["updated_at", "2014-09-17 00:32:49.722390"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.724758"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.724758"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.725678') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-09-17 00:32:49.725678"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:32:49.726813"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:32:49.732296"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.733836"], ["updated_at", "2014-09-17 00:32:49.733836"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.735239"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.735239"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.735872') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-09-17 00:32:49.735872"], ["updated_at", "2014-09-17 00:32:49.736706"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-09-17 00:32:49.739570"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-09-17 00:32:49.740709') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-09-17 00:32:49.740709"], ["editor_id", 12], ["updated_at", "2014-09-17 00:32:49.741516"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-09-17 00:32:49.744330"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.747034"], ["updated_at", "2014-09-17 00:32:49.747034"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.748144"], ["updated_at", "2014-09-17 00:32:49.748144"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.749076"], ["updated_at", "2014-09-17 00:32:49.749076"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.750670"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.750670"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.760586"], ["updated_at", "2014-09-17 00:32:49.760586"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.766049"], ["updated_at", "2014-09-17 00:32:49.766049"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.767195"], ["updated_at", "2014-09-17 00:32:49.767195"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.768129"], ["updated_at", "2014-09-17 00:32:49.768129"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.769764"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.769764"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.770648"], ["updated_at", "2014-09-17 00:32:49.770648"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.778730"], ["updated_at", "2014-09-17 00:32:49.778730"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 10ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.2ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.8ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:32:49.794376"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:32:49.801180"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.807407"], ["updated_at", "2014-09-17 00:32:49.807407"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.809506"], ["updated_at", "2014-09-17 00:32:49.809506"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.810985"], ["updated_at", "2014-09-17 00:32:49.810985"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.813555"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.813555"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.821788"], ["updated_at", "2014-09-17 00:32:49.821788"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.827571"], ["updated_at", "2014-09-17 00:32:49.827571"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.829457"], ["updated_at", "2014-09-17 00:32:49.829457"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.831116"], ["updated_at", "2014-09-17 00:32:49.831116"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.833658"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.833658"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.834941"], ["updated_at", "2014-09-17 00:32:49.834941"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.840564"], ["updated_at", "2014-09-17 00:32:49.840564"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 11ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:32:49.860135"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:32:49.866004"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.871796"], ["updated_at", "2014-09-17 00:32:49.871796"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.873116"], ["updated_at", "2014-09-17 00:32:49.873116"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.874219"], ["updated_at", "2014-09-17 00:32:49.874219"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.875975"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.875975"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.878252"], ["updated_at", "2014-09-17 00:32:49.878252"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.887244"], ["updated_at", "2014-09-17 00:32:49.887244"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.893805"], ["updated_at", "2014-09-17 00:32:49.893805"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.895670"], ["updated_at", "2014-09-17 00:32:49.895670"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.897212"], ["updated_at", "2014-09-17 00:32:49.897212"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.899680"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.899680"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.900911"], ["updated_at", "2014-09-17 00:32:49.900911"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:32:49.903382"], ["updated_at", "2014-09-17 00:32:49.903382"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.920743"], ["updated_at", "2014-09-17 00:32:49.920743"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 8ms (ActiveRecord: 0.8ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.936874"], ["updated_at", "2014-09-17 00:32:49.936874"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.938880"], ["updated_at", "2014-09-17 00:32:49.938880"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.940419"], ["updated_at", "2014-09-17 00:32:49.940419"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:32:49.942928"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.942928"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.944189"], ["updated_at", "2014-09-17 00:32:49.944189"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.948507"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.948507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:32:49.952230"], ["updated_at", "2014-09-17 00:32:49.952230"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.953962"], ["updated_at", "2014-09-17 00:32:49.953962"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:32:49.955391"], ["updated_at", "2014-09-17 00:32:49.955391"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:32:49.957706"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.957706"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:32:49.958924"], ["updated_at", "2014-09-17 00:32:49.958924"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:32:49.961792"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.961792"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:32:49.966284"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:32:49.966284"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[36m (1.8ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (1.0ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:28.996301"], ["updated_at", "2014-09-17 00:34:28.996301"]] [1m[35m (1.5ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.003755"], ["updated_at", "2014-09-17 00:34:29.003755"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.006571"], ["updated_at", "2014-09-17 00:34:29.006571"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.007698"], ["updated_at", "2014-09-17 00:34:29.007698"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.017588"], ["updated_at", "2014-09-17 00:34:29.017588"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.018985"], ["updated_at", "2014-09-17 00:34:29.018985"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.019900"], ["updated_at", "2014-09-17 00:34:29.019900"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.027353"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.027353"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.029350"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.031333"], ["updated_at", "2014-09-17 00:34:29.031333"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.032362"], ["updated_at", "2014-09-17 00:34:29.032362"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.033251"], ["updated_at", "2014-09-17 00:34:29.033251"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.034171') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.035166"], ["updated_at", "2014-09-17 00:34:29.035166"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.035653"], ["creator_id", 1], ["creator_type", "DummyUser"], ["deleted_at", "2014-09-17 00:34:29.034171"], ["editor_id", 2], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.035653"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-09-17 00:34:29.037213"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.038609"], ["updated_at", "2014-09-17 00:34:29.038609"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.039614"], ["updated_at", "2014-09-17 00:34:29.039614"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.040581"], ["updated_at", "2014-09-17 00:34:29.040581"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.042341"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.042341"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.043952"], ["updated_at", "2014-09-17 00:34:29.043952"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.045269"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.050397"], ["updated_at", "2014-09-17 00:34:29.050397"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.051518"], ["updated_at", "2014-09-17 00:34:29.051518"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.052540"], ["updated_at", "2014-09-17 00:34:29.052540"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.054151"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.054151"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.062703"], ["updated_at", "2014-09-17 00:34:29.062703"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.063946"], ["updated_at", "2014-09-17 00:34:29.063946"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.064901"], ["updated_at", "2014-09-17 00:34:29.064901"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.066461"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.066461"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.075270"], ["updated_at", "2014-09-17 00:34:29.075270"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.077225"], ["updated_at", "2014-09-17 00:34:29.077225"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.078821"], ["updated_at", "2014-09-17 00:34:29.078821"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.081329"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.081329"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-09-17 00:34:29.085421"], ["updated_at", "2014-09-17 00:34:29.086527"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.090928"], ["updated_at", "2014-09-17 00:34:29.090928"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.092791"], ["updated_at", "2014-09-17 00:34:29.092791"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.094311"], ["updated_at", "2014-09-17 00:34:29.094311"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.096766"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.096766"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.101119"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.101119"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-09-17 00:34:29.109960"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.109960"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-09-17 00:34:29.113814"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.113814"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.117182"], ["updated_at", "2014-09-17 00:34:29.117182"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.119095"], ["updated_at", "2014-09-17 00:34:29.119095"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.120720"], ["updated_at", "2014-09-17 00:34:29.120720"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.123134"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.123134"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.131576"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.131576"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.138354"], ["updated_at", "2014-09-17 00:34:29.138354"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.140293"], ["updated_at", "2014-09-17 00:34:29.140293"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.141809"], ["updated_at", "2014-09-17 00:34:29.141809"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.144165"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.144165"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.150537"], ["updated_at", "2014-09-17 00:34:29.150537"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.154175"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.154175"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.159450"], ["updated_at", "2014-09-17 00:34:29.159450"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.161434"], ["updated_at", "2014-09-17 00:34:29.161434"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.162971"], ["updated_at", "2014-09-17 00:34:29.162971"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.171541"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.171541"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.183949"], ["updated_at", "2014-09-17 00:34:29.183949"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.185876"], ["updated_at", "2014-09-17 00:34:29.185876"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.187407"], ["updated_at", "2014-09-17 00:34:29.187407"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.189865"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.189865"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.196756"], ["updated_at", "2014-09-17 00:34:29.196756"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.201151"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.201151"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.209813"], ["updated_at", "2014-09-17 00:34:29.209813"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.211368"], ["updated_at", "2014-09-17 00:34:29.211368"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.212644"], ["updated_at", "2014-09-17 00:34:29.212644"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.214645"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.214645"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.219532"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.230424"], ["updated_at", "2014-09-17 00:34:29.230424"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.231507"], ["updated_at", "2014-09-17 00:34:29.231507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.232422"], ["updated_at", "2014-09-17 00:34:29.232422"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.233903"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.233903"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.238365') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:34:29.238365"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.239694"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.245120"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.245120"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-09-17 00:34:29.246567"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.251777"], ["updated_at", "2014-09-17 00:34:29.251777"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.253869"], ["updated_at", "2014-09-17 00:34:29.253869"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.255185"], ["updated_at", "2014-09-17 00:34:29.255185"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.257275"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.257275"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.261371') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:34:29.261371"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.262270"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.263977"], ["updated_at", "2014-09-17 00:34:29.263977"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.265372"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.265372"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:34:29.266766"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.268672') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:34:29.268672"], ["editor_id", 2], ["updated_at", "2014-09-17 00:34:29.269527"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-09-17 00:34:29.271514"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.273405') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:34:29.273405"], ["editor_id", 2], ["updated_at", "2014-09-17 00:34:29.274260"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.277315"], ["updated_at", "2014-09-17 00:34:29.277315"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.279219"], ["updated_at", "2014-09-17 00:34:29.279219"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.280763"], ["updated_at", "2014-09-17 00:34:29.280763"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.283048"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.283048"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.284024') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:34:29.284024"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.285246"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:34:29.292863"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.297082"], ["updated_at", "2014-09-17 00:34:29.297082"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.297648') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:34:29.297648"], ["editor_id", 2], ["updated_at", "2014-09-17 00:34:29.298490"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.302689"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.302689"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-09-17 00:34:29.304709"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.305220') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:34:29.305220"], ["updated_at", "2014-09-17 00:34:29.305994"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.312120"], ["updated_at", "2014-09-17 00:34:29.312120"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.314071"], ["updated_at", "2014-09-17 00:34:29.314071"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.315592"], ["updated_at", "2014-09-17 00:34:29.315592"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.317978"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.317978"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.318882') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:34:29.318882"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.319996"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-09-17 00:34:29.325529"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.327286"], ["updated_at", "2014-09-17 00:34:29.327286"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.328721"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.328721"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.329367') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-09-17 00:34:29.329367"], ["updated_at", "2014-09-17 00:34:29.330153"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-09-17 00:34:29.333411"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-09-17 00:34:29.334650') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-09-17 00:34:29.334650"], ["editor_id", 1], ["updated_at", "2014-09-17 00:34:29.335480"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-09-17 00:34:29.338597"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.341467"], ["updated_at", "2014-09-17 00:34:29.341467"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.343263"], ["updated_at", "2014-09-17 00:34:29.343263"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.344885"], ["updated_at", "2014-09-17 00:34:29.344885"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.347243"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.347243"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.359724"], ["updated_at", "2014-09-17 00:34:29.359724"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.366365"], ["updated_at", "2014-09-17 00:34:29.366365"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.367882"], ["updated_at", "2014-09-17 00:34:29.367882"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.369427"], ["updated_at", "2014-09-17 00:34:29.369427"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.371954"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.371954"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.373218"], ["updated_at", "2014-09-17 00:34:29.373218"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.387715"], ["updated_at", "2014-09-17 00:34:29.387715"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 16ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:34:29.401969"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:34:29.408002"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.413538"], ["updated_at", "2014-09-17 00:34:29.413538"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.414680"], ["updated_at", "2014-09-17 00:34:29.414680"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.415648"], ["updated_at", "2014-09-17 00:34:29.415648"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.417321"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.417321"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.424421"], ["updated_at", "2014-09-17 00:34:29.424421"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.429877"], ["updated_at", "2014-09-17 00:34:29.429877"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.431003"], ["updated_at", "2014-09-17 00:34:29.431003"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.431885"], ["updated_at", "2014-09-17 00:34:29.431885"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.433398"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.433398"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.434266"], ["updated_at", "2014-09-17 00:34:29.434266"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.438537"], ["updated_at", "2014-09-17 00:34:29.438537"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-09-17 00:34:29.451688"], ["vote_flag", "t"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-09-17 00:34:29.458052"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.7ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.463957"], ["updated_at", "2014-09-17 00:34:29.463957"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.465356"], ["updated_at", "2014-09-17 00:34:29.465356"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.466486"], ["updated_at", "2014-09-17 00:34:29.466486"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.468944"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.468944"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 1 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.471872"], ["updated_at", "2014-09-17 00:34:29.471872"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 1], ["voter_type", "DummyUser"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.481342"], ["updated_at", "2014-09-17 00:34:29.481342"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.487754"], ["updated_at", "2014-09-17 00:34:29.487754"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.489659"], ["updated_at", "2014-09-17 00:34:29.489659"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.491174"], ["updated_at", "2014-09-17 00:34:29.491174"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.493649"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.493649"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.494920"], ["updated_at", "2014-09-17 00:34:29.494920"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.497412"], ["updated_at", "2014-09-17 00:34:29.497412"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.514957"], ["updated_at", "2014-09-17 00:34:29.514957"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.525892"], ["updated_at", "2014-09-17 00:34:29.525892"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.527061"], ["updated_at", "2014-09-17 00:34:29.527061"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.527981"], ["updated_at", "2014-09-17 00:34:29.527981"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.529567"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.529567"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.530519"], ["updated_at", "2014-09-17 00:34:29.530519"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.533875"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.533875"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.537405"], ["updated_at", "2014-09-17 00:34:29.537405"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.538496"], ["updated_at", "2014-09-17 00:34:29.538496"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.539441"], ["updated_at", "2014-09-17 00:34:29.539441"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.541372"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.541372"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.542283"], ["updated_at", "2014-09-17 00:34:29.542283"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.547999"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.547999"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.551789"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.551789"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.556440"], ["updated_at", "2014-09-17 00:34:29.556440"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.558071"], ["updated_at", "2014-09-17 00:34:29.558071"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.559632"], ["updated_at", "2014-09-17 00:34:29.559632"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.562832"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.562832"]] [1m[36m (1.2ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.564945"], ["updated_at", "2014-09-17 00:34:29.564945"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.567674"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-09-17 00:34:29.567674"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.571138"], ["updated_at", "2014-09-17 00:34:29.571138"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.572973"], ["updated_at", "2014-09-17 00:34:29.572973"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.574546"], ["updated_at", "2014-09-17 00:34:29.574546"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.577275"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-09-17 00:34:29.577275"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2 [["closed_at", "2014-09-17 00:34:29.578770"], ["closer_id", 3], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.579542"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 3], ["commontable_type", "DummyModel"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2[0m [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-09-17 00:34:29.584198"]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.585268"], ["updated_at", "2014-09-17 00:34:29.585268"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 2]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 3], ["commontable_type", "DummyModel"]] [1m[36mCommontator::Comment Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 3]] [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.595185"], ["updated_at", "2014-09-17 00:34:29.595185"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.596962"], ["updated_at", "2014-09-17 00:34:29.596962"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.598596"], ["updated_at", "2014-09-17 00:34:29.598596"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4[0m [["closed_at", "2014-09-17 00:34:29.599832"], ["closer_id", 4], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.600586"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:34:29.602805"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.604285"], ["updated_at", "2014-09-17 00:34:29.604285"]] [1m[36m (3.9ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.609401"], ["updated_at", "2014-09-17 00:34:29.609401"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.611076"], ["updated_at", "2014-09-17 00:34:29.611076"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 5 [["commontable_id", nil], ["updated_at", "2014-09-17 00:34:29.613044"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.615025"], ["updated_at", "2014-09-17 00:34:29.615025"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.616610"], ["updated_at", "2014-09-17 00:34:29.616610"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.618196"], ["updated_at", "2014-09-17 00:34:29.618196"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.619782"], ["updated_at", "2014-09-17 00:34:29.619782"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.621373"], ["updated_at", "2014-09-17 00:34:29.621373"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.622795"], ["updated_at", "2014-09-17 00:34:29.622795"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.625354"], ["creator_id", 7], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-09-17 00:34:29.625354"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.627619"], ["creator_id", 7], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-09-17 00:34:29.627619"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 7]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.630497"], ["updated_at", "2014-09-17 00:34:29.630497"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.632158"], ["updated_at", "2014-09-17 00:34:29.632158"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.633622"], ["updated_at", "2014-09-17 00:34:29.633622"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.2ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 8 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.636521"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:34:29.636521"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 8]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.636521') [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.641333"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-09-17 00:34:29.641333"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 8]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.636521') [["thread_id", 8]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:34:29.645499' WHERE "commontator_subscriptions"."id" = 3[0m [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 8]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.645499') [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.650234"], ["updated_at", "2014-09-17 00:34:29.650234"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.652584"], ["updated_at", "2014-09-17 00:34:29.652584"]] [1m[35m (0.4ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.654174"], ["updated_at", "2014-09-17 00:34:29.654174"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.2ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.657509"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-09-17 00:34:29.657509"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.659081"], ["updated_at", "2014-09-17 00:34:29.659081"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 10) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.662308"], ["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-09-17 00:34:29.662308"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.670630"], ["updated_at", "2014-09-17 00:34:29.670630"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.675297"], ["updated_at", "2014-09-17 00:34:29.675297"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.676574"], ["updated_at", "2014-09-17 00:34:29.676574"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.677563"], ["updated_at", "2014-09-17 00:34:29.677563"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.678422"], ["updated_at", "2014-09-17 00:34:29.678422"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.680730"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.680730"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.682628"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.682628"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-09-17 00:34:29.684231"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.684231"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (3.5ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 20.6ms Sent mail to Undisclosed Recipients (5.2ms) Date: Tue, 16 Sep 2014 19:34:29 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <5418d715ad7f4_c8e3fdec502dbe88253e@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #12 posted a comment on DummyModel #10 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #10.
[1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.720243"], ["updated_at", "2014-09-17 00:34:29.720243"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.722279"], ["updated_at", "2014-09-17 00:34:29.722279"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.723744"], ["updated_at", "2014-09-17 00:34:29.723744"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.731241"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.731241"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.736382"], ["updated_at", "2014-09-17 00:34:29.736382"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.738295"], ["updated_at", "2014-09-17 00:34:29.738295"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.739859"], ["updated_at", "2014-09-17 00:34:29.739859"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.744961"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.744961"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.751114"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.751114"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.756623"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.756623"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.760715"], ["updated_at", "2014-09-17 00:34:29.760715"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.762712"], ["updated_at", "2014-09-17 00:34:29.762712"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.764251"], ["updated_at", "2014-09-17 00:34:29.764251"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 00:34:29.767304"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.767304"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.776457"], ["updated_at", "2014-09-17 00:34:29.776457"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.777549"], ["updated_at", "2014-09-17 00:34:29.777549"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.778475"], ["updated_at", "2014-09-17 00:34:29.778475"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.780438"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.780438"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.785785"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.785785"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.790476"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.790476"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 8]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.799065"], ["updated_at", "2014-09-17 00:34:29.799065"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.800224"], ["updated_at", "2014-09-17 00:34:29.800224"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 10]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (13.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.821149"], ["updated_at", "2014-09-17 00:34:29.821149"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.823195"], ["updated_at", "2014-09-17 00:34:29.823195"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.824723"], ["updated_at", "2014-09-17 00:34:29.824723"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 00:34:29.826854"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.826854"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.826854')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-09-17 00:34:29.830049"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.830049"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.826854')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-09-17 00:34:29.833864"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-09-17 00:34:29.833864"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.826854')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-09-17 00:34:29.836879' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-09-17 00:34:29.836879') [["thread_id", 10]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.842456"], ["updated_at", "2014-09-17 00:34:29.842456"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.844384"], ["updated_at", "2014-09-17 00:34:29.844384"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.845849"], ["updated_at", "2014-09-17 00:34:29.845849"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.854415"], ["updated_at", "2014-09-17 00:34:29.854415"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.855909"], ["updated_at", "2014-09-17 00:34:29.855909"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.857133"], ["updated_at", "2014-09-17 00:34:29.857133"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.868647"], ["updated_at", "2014-09-17 00:34:29.868647"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.869868"], ["updated_at", "2014-09-17 00:34:29.869868"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.870840"], ["updated_at", "2014-09-17 00:34:29.870840"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-09-17 00:34:29.875677"], ["updated_at", "2014-09-17 00:34:29.876410"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.881000"], ["updated_at", "2014-09-17 00:34:29.881000"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.882977"], ["updated_at", "2014-09-17 00:34:29.882977"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.884467"], ["updated_at", "2014-09-17 00:34:29.884467"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-09-17 00:34:29.887445"], ["closer_id", 12], ["closer_type", "DummyUser"], ["updated_at", "2014-09-17 00:34:29.888467"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:34:29.891151"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-09-17 00:34:29.893359"], ["updated_at", "2014-09-17 00:34:29.894202"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.896900"], ["updated_at", "2014-09-17 00:34:29.896900"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.897965"], ["updated_at", "2014-09-17 00:34:29.897965"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.898863"], ["updated_at", "2014-09-17 00:34:29.898863"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-09-17 00:34:29.899420"], ["updated_at", "2014-09-17 00:34:29.900116"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-09-17 00:34:29.905698"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.8ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-09-17 00:34:29.909765"], ["updated_at", "2014-09-17 00:34:29.909765"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-09-17 00:34:29.910878"], ["updated_at", "2014-09-17 00:34:29.910878"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-09-17 00:34:29.911813"], ["updated_at", "2014-09-17 00:34:29.911813"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-09-17 00:34:29.912381"], ["updated_at", "2014-09-17 00:34:29.913151"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:34:29.915877"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-09-17 00:34:29.917207"], ["updated_at", "2014-09-17 00:34:29.917800"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-09-17 00:34:29.920983"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[36m (1.2ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.6ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.6ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.6ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.6ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.6ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.5ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.5ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.6ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.5ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.5ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.5ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (1.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.224499"], ["updated_at", "2014-10-20 16:59:39.224499"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.248940"], ["updated_at", "2014-10-20 16:59:39.248940"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.252039"], ["updated_at", "2014-10-20 16:59:39.252039"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.253130"], ["updated_at", "2014-10-20 16:59:39.253130"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.300007"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.300007"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.302550"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.302550"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.313182"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.313182"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (3.5ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (32.9ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 55.9ms Sent mail to Undisclosed Recipients (7.6ms) Date: Mon, 20 Oct 2014 11:59:39 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <54453f7b5c424_4dd3fe425833bd429961@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #1 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #1.
[1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.386145"], ["updated_at", "2014-10-20 16:59:39.386145"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.387562"], ["updated_at", "2014-10-20 16:59:39.387562"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.388537"], ["updated_at", "2014-10-20 16:59:39.388537"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (2.8ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.395145"], ["updated_at", "2014-10-20 16:59:39.395145"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.396386"], ["updated_at", "2014-10-20 16:59:39.396386"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.397294"], ["updated_at", "2014-10-20 16:59:39.397294"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.399082"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.399082"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:39.400966"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (2.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.404495"], ["updated_at", "2014-10-20 16:59:39.404495"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.405486"], ["updated_at", "2014-10-20 16:59:39.405486"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.406362"], ["updated_at", "2014-10-20 16:59:39.406362"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:39.407229') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.408167"], ["updated_at", "2014-10-20 16:59:39.408167"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.408644"], ["creator_id", 1], ["creator_type", "DummyUser"], ["deleted_at", "2014-10-20 16:59:39.407229"], ["editor_id", 2], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.408644"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-10-20 16:59:39.410162"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (2.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.413595"], ["updated_at", "2014-10-20 16:59:39.413595"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.415345"], ["updated_at", "2014-10-20 16:59:39.415345"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.416891"], ["updated_at", "2014-10-20 16:59:39.416891"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.419135"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.419135"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.421270"], ["updated_at", "2014-10-20 16:59:39.421270"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:39.423027"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (2.3ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.429040"], ["updated_at", "2014-10-20 16:59:39.429040"]] [1m[36m (0.9ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.431843"], ["updated_at", "2014-10-20 16:59:39.431843"]] [1m[35m (8.1ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.441323"], ["updated_at", "2014-10-20 16:59:39.441323"]] [1m[36m (3.4ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.446545"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.446545"]] [1m[36m (3.1ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.451188"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 16:59:39.451188"]] [1m[36m (3.2ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.456970"], ["updated_at", "2014-10-20 16:59:39.456970"]] [1m[35m (5.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.463661"], ["updated_at", "2014-10-20 16:59:39.463661"]] [1m[36m (5.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.470532"], ["updated_at", "2014-10-20 16:59:39.470532"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.473787"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-10-20 16:59:39.473787"]] [1m[36m (3.3ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.478196"], ["updated_at", "2014-10-20 16:59:39.478196"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.481553"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-10-20 16:59:39.481553"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.486267"], ["updated_at", "2014-10-20 16:59:39.486267"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.487874"], ["updated_at", "2014-10-20 16:59:39.487874"]] [1m[36m (5.8ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.494726"], ["updated_at", "2014-10-20 16:59:39.494726"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.497962"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-10-20 16:59:39.497962"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.497962')[0m [["thread_id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 3 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.502999"], ["creator_id", 4], ["creator_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-10-20 16:59:39.502999"]] [1m[36m (3.3ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.497962')[0m [["thread_id", 3]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 16:59:39.509861' WHERE "commontator_subscriptions"."id" = 3 [1m[36m (5.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.509861')[0m [["thread_id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.518409"], ["updated_at", "2014-10-20 16:59:39.518409"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.520164"], ["updated_at", "2014-10-20 16:59:39.520164"]] [1m[36m (6.1ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.528267"], ["updated_at", "2014-10-20 16:59:39.528267"]] [1m[35m (3.2ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 5 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.533632"], ["creator_id", 5], ["creator_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-10-20 16:59:39.533632"]] [1m[35m (3.4ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4[0m [["closed_at", "2014-10-20 16:59:39.537694"], ["closer_id", 5], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:39.538960"]] [1m[35m (1.5ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 4]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-10-20 16:59:39.545476"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.546789"], ["updated_at", "2014-10-20 16:59:39.546789"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 4]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 4]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1 [["thread_id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.550860"], ["updated_at", "2014-10-20 16:59:39.550860"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.552523"], ["updated_at", "2014-10-20 16:59:39.552523"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.554074"], ["updated_at", "2014-10-20 16:59:39.554074"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 6 [["commontable_id", nil], ["updated_at", "2014-10-20 16:59:39.556304"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.558313"], ["updated_at", "2014-10-20 16:59:39.558313"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.560076"], ["updated_at", "2014-10-20 16:59:39.560076"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.561731"], ["updated_at", "2014-10-20 16:59:39.561731"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7 [["closed_at", "2014-10-20 16:59:39.562976"], ["closer_id", 7], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:39.563785"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7 [["closed_at", nil], ["updated_at", "2014-10-20 16:59:39.565691"]] [1m[36m (2.4ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.569017"], ["updated_at", "2014-10-20 16:59:39.569017"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.571114"], ["updated_at", "2014-10-20 16:59:39.571114"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.572908"], ["updated_at", "2014-10-20 16:59:39.572908"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.574666"], ["updated_at", "2014-10-20 16:59:39.574666"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.576403"], ["updated_at", "2014-10-20 16:59:39.576403"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.577956"], ["updated_at", "2014-10-20 16:59:39.577956"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.580994"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-10-20 16:59:39.580994"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.582443"], ["updated_at", "2014-10-20 16:59:39.582443"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 10) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.584962"], ["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-10-20 16:59:39.584962"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 9]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.593320"], ["updated_at", "2014-10-20 16:59:39.593320"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.594490"], ["updated_at", "2014-10-20 16:59:39.594490"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (0.7ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.608384"], ["updated_at", "2014-10-20 16:59:39.608384"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.610073"], ["updated_at", "2014-10-20 16:59:39.610073"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.611299"], ["updated_at", "2014-10-20 16:59:39.611299"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.618992"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.618992"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.624804"], ["updated_at", "2014-10-20 16:59:39.624804"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.627078"], ["updated_at", "2014-10-20 16:59:39.627078"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.628510"], ["updated_at", "2014-10-20 16:59:39.628510"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.634137"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.634137"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.657800"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.657800"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 22ms (ActiveRecord: 0.4ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.664323"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.664323"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.668667"], ["updated_at", "2014-10-20 16:59:39.668667"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.670784"], ["updated_at", "2014-10-20 16:59:39.670784"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.672228"], ["updated_at", "2014-10-20 16:59:39.672228"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.675783"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.675783"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.686755"], ["updated_at", "2014-10-20 16:59:39.686755"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.687971"], ["updated_at", "2014-10-20 16:59:39.687971"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.688861"], ["updated_at", "2014-10-20 16:59:39.688861"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.691039"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.691039"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.726135"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.726135"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:39.730761"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.730761"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 8]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.735971"], ["updated_at", "2014-10-20 16:59:39.735971"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.737167"], ["updated_at", "2014-10-20 16:59:39.737167"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.738063"], ["updated_at", "2014-10-20 16:59:39.738063"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.743751"], ["updated_at", "2014-10-20 16:59:39.743751"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.744910"], ["updated_at", "2014-10-20 16:59:39.744910"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.745898"], ["updated_at", "2014-10-20 16:59:39.745898"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 9], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/9 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 9], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/9 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 9], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/9 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.757182"], ["updated_at", "2014-10-20 16:59:39.757182"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.758405"], ["updated_at", "2014-10-20 16:59:39.758405"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.759309"], ["updated_at", "2014-10-20 16:59:39.759309"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 16:59:39.764460"], ["updated_at", "2014-10-20 16:59:39.765309"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.3ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.769833"], ["updated_at", "2014-10-20 16:59:39.769833"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.771821"], ["updated_at", "2014-10-20 16:59:39.771821"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.773314"], ["updated_at", "2014-10-20 16:59:39.773314"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 16:59:39.776934"], ["closer_id", 11], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:39.778169"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-10-20 16:59:39.780981"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 16:59:39.782696"], ["updated_at", "2014-10-20 16:59:39.783380"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.786061"], ["updated_at", "2014-10-20 16:59:39.786061"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.787310"], ["updated_at", "2014-10-20 16:59:39.787310"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.788208"], ["updated_at", "2014-10-20 16:59:39.788208"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 16:59:39.788778"], ["updated_at", "2014-10-20 16:59:39.789497"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 16:59:39.795981"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.800123"], ["updated_at", "2014-10-20 16:59:39.800123"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.801364"], ["updated_at", "2014-10-20 16:59:39.801364"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.802263"], ["updated_at", "2014-10-20 16:59:39.802263"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 16:59:39.802833"], ["updated_at", "2014-10-20 16:59:39.803656"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-10-20 16:59:39.807002"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 16:59:39.808462"], ["updated_at", "2014-10-20 16:59:39.809185"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-10-20 16:59:39.811587"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.816080"], ["updated_at", "2014-10-20 16:59:39.816080"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.819119"], ["updated_at", "2014-10-20 16:59:39.819119"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.820660"], ["updated_at", "2014-10-20 16:59:39.820660"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.821923"], ["updated_at", "2014-10-20 16:59:39.821923"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:39.823965"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.823965"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.823965')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.826742"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.826742"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.823965')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.830140"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.830140"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.823965')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 16:59:39.832445' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 16:59:39.832445') [["thread_id", 10]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.837919"], ["updated_at", "2014-10-20 16:59:39.837919"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.839925"], ["updated_at", "2014-10-20 16:59:39.839925"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.841374"], ["updated_at", "2014-10-20 16:59:39.841374"]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.843870"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.843870"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.850142"], ["updated_at", "2014-10-20 16:59:39.850142"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.851369"], ["updated_at", "2014-10-20 16:59:39.851369"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.852316"], ["updated_at", "2014-10-20 16:59:39.852316"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.854018"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.854018"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.863151"], ["updated_at", "2014-10-20 16:59:39.863151"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.864349"], ["updated_at", "2014-10-20 16:59:39.864349"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.865254"], ["updated_at", "2014-10-20 16:59:39.865254"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:39.866946"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.866946"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 16:59:39.870219"], ["updated_at", "2014-10-20 16:59:39.871063"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.874650"], ["updated_at", "2014-10-20 16:59:39.874650"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.875853"], ["updated_at", "2014-10-20 16:59:39.875853"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.876827"], ["updated_at", "2014-10-20 16:59:39.876827"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.878529"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.878529"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.882183"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.882183"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Another thing"], ["created_at", "2014-10-20 16:59:39.886515"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.886515"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "And this too"], ["created_at", "2014-10-20 16:59:39.891112"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.891112"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 24ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.915814"], ["updated_at", "2014-10-20 16:59:39.915814"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.917474"], ["updated_at", "2014-10-20 16:59:39.917474"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.918605"], ["updated_at", "2014-10-20 16:59:39.918605"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.920612"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.920612"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.929298"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.929298"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.937865"], ["updated_at", "2014-10-20 16:59:39.937865"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.940076"], ["updated_at", "2014-10-20 16:59:39.940076"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.941589"], ["updated_at", "2014-10-20 16:59:39.941589"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.944139"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.944139"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.951613"], ["updated_at", "2014-10-20 16:59:39.951613"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.956604"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.956604"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.961632"], ["updated_at", "2014-10-20 16:59:39.961632"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.963009"], ["updated_at", "2014-10-20 16:59:39.963009"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.964131"], ["updated_at", "2014-10-20 16:59:39.964131"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.966151"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.966151"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.980641"], ["updated_at", "2014-10-20 16:59:39.980641"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:39.981924"], ["updated_at", "2014-10-20 16:59:39.981924"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:39.982870"], ["updated_at", "2014-10-20 16:59:39.982870"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:39.984714"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.984714"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:39.991239"], ["updated_at", "2014-10-20 16:59:39.991239"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:39.996441"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:39.996441"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.002452"], ["updated_at", "2014-10-20 16:59:40.002452"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.003769"], ["updated_at", "2014-10-20 16:59:40.003769"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.005164"], ["updated_at", "2014-10-20 16:59:40.005164"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:40.007218"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.007218"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:40.013285"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.026236"], ["updated_at", "2014-10-20 16:59:40.026236"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.027637"], ["updated_at", "2014-10-20 16:59:40.027637"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.028762"], ["updated_at", "2014-10-20 16:59:40.028762"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:40.030622"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.030622"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.036930') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 16:59:40.036930"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:40.038780"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.045908"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.045908"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-10-20 16:59:40.047609"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.053307"], ["updated_at", "2014-10-20 16:59:40.053307"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.054705"], ["updated_at", "2014-10-20 16:59:40.054705"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.055910"], ["updated_at", "2014-10-20 16:59:40.055910"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.057943"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.057943"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.093377') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 16:59:40.093377"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:40.095039"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.097100"], ["updated_at", "2014-10-20 16:59:40.097100"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.098616"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.098616"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 16:59:40.100246"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.102668') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 16:59:40.102668"], ["editor_id", 13], ["updated_at", "2014-10-20 16:59:40.103687"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 16:59:40.105978"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.108080') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 16:59:40.108080"], ["editor_id", 13], ["updated_at", "2014-10-20 16:59:40.109059"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (2.1ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.114184"], ["updated_at", "2014-10-20 16:59:40.114184"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.115859"], ["updated_at", "2014-10-20 16:59:40.115859"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.116855"], ["updated_at", "2014-10-20 16:59:40.116855"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:40.118655"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.118655"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.119305') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 16:59:40.119305"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:40.120142"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 16:59:40.127856"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.132054"], ["updated_at", "2014-10-20 16:59:40.132054"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.132598') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 16:59:40.132598"], ["editor_id", 13], ["updated_at", "2014-10-20 16:59:40.133496"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.137407"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.137407"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 16:59:40.139247"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.139727') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 16:59:40.139727"], ["updated_at", "2014-10-20 16:59:40.140452"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.145760"], ["updated_at", "2014-10-20 16:59:40.145760"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.147001"], ["updated_at", "2014-10-20 16:59:40.147001"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.148045"], ["updated_at", "2014-10-20 16:59:40.148045"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.149732"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.149732"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.150375') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 16:59:40.150375"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 16:59:40.151184"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 16:59:40.156950"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.158777"], ["updated_at", "2014-10-20 16:59:40.158777"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.160251"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.160251"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.160888') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 16:59:40.160888"], ["updated_at", "2014-10-20 16:59:40.161700"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-10-20 16:59:40.164587"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 16:59:40.165774') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 16:59:40.165774"], ["editor_id", 12], ["updated_at", "2014-10-20 16:59:40.166634"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-10-20 16:59:40.169675"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.172362"], ["updated_at", "2014-10-20 16:59:40.172362"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.173619"], ["updated_at", "2014-10-20 16:59:40.173619"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.174532"], ["updated_at", "2014-10-20 16:59:40.174532"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.176198"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.176198"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.186634"], ["updated_at", "2014-10-20 16:59:40.186634"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.193216"], ["updated_at", "2014-10-20 16:59:40.193216"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.194395"], ["updated_at", "2014-10-20 16:59:40.194395"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.195318"], ["updated_at", "2014-10-20 16:59:40.195318"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.196967"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.196967"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.197840"], ["updated_at", "2014-10-20 16:59:40.197840"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:40.207696"], ["updated_at", "2014-10-20 16:59:40.207696"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 13ms (ActiveRecord: 0.8ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 16:59:40.224676"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 16:59:40.231199"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.237503"], ["updated_at", "2014-10-20 16:59:40.237503"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.238779"], ["updated_at", "2014-10-20 16:59:40.238779"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.239729"], ["updated_at", "2014-10-20 16:59:40.239729"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.241380"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.241380"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.249866"], ["updated_at", "2014-10-20 16:59:40.249866"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.278787"], ["updated_at", "2014-10-20 16:59:40.278787"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.280227"], ["updated_at", "2014-10-20 16:59:40.280227"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.281302"], ["updated_at", "2014-10-20 16:59:40.281302"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.283128"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.283128"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.284291"], ["updated_at", "2014-10-20 16:59:40.284291"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:40.289587"], ["updated_at", "2014-10-20 16:59:40.289587"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 16:59:40.305485"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 16:59:40.313012"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.7ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.320323"], ["updated_at", "2014-10-20 16:59:40.320323"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.321903"], ["updated_at", "2014-10-20 16:59:40.321903"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.323136"], ["updated_at", "2014-10-20 16:59:40.323136"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.325343"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.325343"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:40.327954"], ["updated_at", "2014-10-20 16:59:40.327954"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.339099"], ["updated_at", "2014-10-20 16:59:40.339099"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.346767"], ["updated_at", "2014-10-20 16:59:40.346767"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.348477"], ["updated_at", "2014-10-20 16:59:40.348477"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.350404"], ["updated_at", "2014-10-20 16:59:40.350404"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.353507"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.353507"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.354900"], ["updated_at", "2014-10-20 16:59:40.354900"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 16:59:40.357742"], ["updated_at", "2014-10-20 16:59:40.357742"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 8ms (ActiveRecord: 0.8ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:40.379604"], ["updated_at", "2014-10-20 16:59:40.379604"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.394706"], ["updated_at", "2014-10-20 16:59:40.394706"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.396094"], ["updated_at", "2014-10-20 16:59:40.396094"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.397152"], ["updated_at", "2014-10-20 16:59:40.397152"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 16:59:40.398850"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.398850"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.399868"], ["updated_at", "2014-10-20 16:59:40.399868"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.404026"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.404026"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.407873"], ["updated_at", "2014-10-20 16:59:40.407873"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.409063"], ["updated_at", "2014-10-20 16:59:40.409063"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 16:59:40.410032"], ["updated_at", "2014-10-20 16:59:40.410032"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 16:59:40.411710"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.411710"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 16:59:40.412658"], ["updated_at", "2014-10-20 16:59:40.412658"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 16:59:40.414763"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.414763"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 16:59:40.418743"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 16:59:40.418743"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 16:59:40.454848"], ["updated_at", "2014-10-20 16:59:40.454848"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[36m (1.4ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.651001"], ["updated_at", "2014-10-20 21:51:38.651001"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.657036"], ["updated_at", "2014-10-20 21:51:38.657036"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.673372"], ["updated_at", "2014-10-20 21:51:38.673372"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.676558"], ["updated_at", "2014-10-20 21:51:38.676558"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-10-20 21:51:38.678276"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:38.686223"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-10-20 21:51:38.689707"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.691606"], ["updated_at", "2014-10-20 21:51:38.691606"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.693358"], ["updated_at", "2014-10-20 21:51:38.693358"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.694907"], ["updated_at", "2014-10-20 21:51:38.694907"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.696519"], ["updated_at", "2014-10-20 21:51:38.696519"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.698035"], ["updated_at", "2014-10-20 21:51:38.698035"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.699478"], ["updated_at", "2014-10-20 21:51:38.699478"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.716291"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-10-20 21:51:38.716291"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.716291') [["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.2ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 3 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:38.728432"], ["creator_id", 4], ["creator_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-10-20 21:51:38.728432"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.2ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.716291') [["thread_id", 3]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 21:51:38.734338' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.734338') [["thread_id", 3]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.737839"], ["updated_at", "2014-10-20 21:51:38.737839"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.739460"], ["updated_at", "2014-10-20 21:51:38.739460"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.740939"], ["updated_at", "2014-10-20 21:51:38.740939"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.743829"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-10-20 21:51:38.743829"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.745348"], ["updated_at", "2014-10-20 21:51:38.745348"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.747874"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-10-20 21:51:38.747874"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 4]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.752157"], ["updated_at", "2014-10-20 21:51:38.752157"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.753781"], ["updated_at", "2014-10-20 21:51:38.753781"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.755259"], ["updated_at", "2014-10-20 21:51:38.755259"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.757999"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-10-20 21:51:38.757999"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.759506"], ["updated_at", "2014-10-20 21:51:38.759506"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.762110"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-10-20 21:51:38.762110"]] [1m[35m (0.4ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 5]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.765282"], ["updated_at", "2014-10-20 21:51:38.765282"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.766862"], ["updated_at", "2014-10-20 21:51:38.766862"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.768376"], ["updated_at", "2014-10-20 21:51:38.768376"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 9 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:38.770660"], ["creator_id", 9], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-10-20 21:51:38.770660"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 6[0m [["closed_at", "2014-10-20 21:51:38.771891"], ["closer_id", 9], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:38.772738"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1[0m [["thread_id", 6]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 6], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mSQL (0.3ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 6 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-10-20 21:51:38.777291"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.779089"], ["updated_at", "2014-10-20 21:51:38.779089"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 6]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1[0m [["thread_id", 6]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 6], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 2 LIMIT 1 [["thread_id", 7]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.783372"], ["updated_at", "2014-10-20 21:51:38.783372"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.785002"], ["updated_at", "2014-10-20 21:51:38.785002"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.786623"], ["updated_at", "2014-10-20 21:51:38.786623"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:38.789140"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-10-20 21:51:38.789140"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:38.791373"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-10-20 21:51:38.791373"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 8]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 8]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.794075"], ["updated_at", "2014-10-20 21:51:38.794075"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.795756"], ["updated_at", "2014-10-20 21:51:38.795756"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.797206"], ["updated_at", "2014-10-20 21:51:38.797206"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", nil]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 9[0m [["commontable_id", nil], ["updated_at", "2014-10-20 21:51:38.799098"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.811827"], ["updated_at", "2014-10-20 21:51:38.811827"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.813232"], ["updated_at", "2014-10-20 21:51:38.813232"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.814223"], ["updated_at", "2014-10-20 21:51:38.814223"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.815051"], ["updated_at", "2014-10-20 21:51:38.815051"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:38.817352"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.817352"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.819374"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.819374"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:38.820963"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.820963"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.5ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (6.5ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 22.6ms Sent mail to Undisclosed Recipients (6.4ms) Date: Mon, 20 Oct 2014 16:51:38 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <544583eacf9fd_a103fe06482dbe089824@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #12 posted a comment on DummyModel #9 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #9.
[1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.861792"], ["updated_at", "2014-10-20 21:51:38.861792"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.863000"], ["updated_at", "2014-10-20 21:51:38.863000"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (0.7ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.872160"], ["updated_at", "2014-10-20 21:51:38.872160"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.873250"], ["updated_at", "2014-10-20 21:51:38.873250"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.874175"], ["updated_at", "2014-10-20 21:51:38.874175"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.879434"], ["updated_at", "2014-10-20 21:51:38.879434"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.880635"], ["updated_at", "2014-10-20 21:51:38.880635"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.881566"], ["updated_at", "2014-10-20 21:51:38.881566"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:38.883337"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.883337"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:38.884756"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.886301"], ["updated_at", "2014-10-20 21:51:38.886301"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.887278"], ["updated_at", "2014-10-20 21:51:38.887278"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.888166"], ["updated_at", "2014-10-20 21:51:38.888166"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:38.889052') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.890061"], ["updated_at", "2014-10-20 21:51:38.890061"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:38.890554"], ["creator_id", 12], ["creator_type", "DummyUser"], ["deleted_at", "2014-10-20 21:51:38.889052"], ["editor_id", 13], ["editor_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.890554"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 21:51:38.892284"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.893820"], ["updated_at", "2014-10-20 21:51:38.893820"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.895552"], ["updated_at", "2014-10-20 21:51:38.895552"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.896616"], ["updated_at", "2014-10-20 21:51:38.896616"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:38.898345"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.898345"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.899928"], ["updated_at", "2014-10-20 21:51:38.899928"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 13], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:38.901258"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.904303"], ["updated_at", "2014-10-20 21:51:38.904303"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.905347"], ["updated_at", "2014-10-20 21:51:38.905347"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.906287"], ["updated_at", "2014-10-20 21:51:38.906287"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:38.913600"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.913600"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.918620"], ["updated_at", "2014-10-20 21:51:38.918620"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.919686"], ["updated_at", "2014-10-20 21:51:38.919686"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.920581"], ["updated_at", "2014-10-20 21:51:38.920581"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.923993"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.923993"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.929118"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.929118"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.935053"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.935053"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.938062"], ["updated_at", "2014-10-20 21:51:38.938062"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.939108"], ["updated_at", "2014-10-20 21:51:38.939108"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.940052"], ["updated_at", "2014-10-20 21:51:38.940052"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:38.942036"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.942036"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.949831"], ["updated_at", "2014-10-20 21:51:38.949831"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.950915"], ["updated_at", "2014-10-20 21:51:38.950915"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.951840"], ["updated_at", "2014-10-20 21:51:38.951840"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.953907"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.953907"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.959262"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.959262"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:38.963941"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.963941"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 8]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.968893"], ["updated_at", "2014-10-20 21:51:38.968893"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.971526"], ["updated_at", "2014-10-20 21:51:38.971526"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.972666"], ["updated_at", "2014-10-20 21:51:38.972666"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.973630"], ["updated_at", "2014-10-20 21:51:38.973630"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:38.975131"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.975131"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.975131') [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:38.977574"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.977574"]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.975131') [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 21:51:38.982157"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:38.982157"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.975131') [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 21:51:38.984710' WHERE "commontator_subscriptions"."id" = 6 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 21:51:38.984710')[0m [["thread_id", 10]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:38.989419"], ["updated_at", "2014-10-20 21:51:38.989419"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:38.990652"], ["updated_at", "2014-10-20 21:51:38.990652"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:38.991596"], ["updated_at", "2014-10-20 21:51:38.991596"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.003396"], ["updated_at", "2014-10-20 21:51:39.003396"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.004545"], ["updated_at", "2014-10-20 21:51:39.004545"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.005475"], ["updated_at", "2014-10-20 21:51:39.005475"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.016028"], ["updated_at", "2014-10-20 21:51:39.016028"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.017139"], ["updated_at", "2014-10-20 21:51:39.017139"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.018088"], ["updated_at", "2014-10-20 21:51:39.018088"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 21:51:39.022867"], ["updated_at", "2014-10-20 21:51:39.023663"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.027926"], ["updated_at", "2014-10-20 21:51:39.027926"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.029870"], ["updated_at", "2014-10-20 21:51:39.029870"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.031041"], ["updated_at", "2014-10-20 21:51:39.031041"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 21:51:39.033674"], ["closer_id", 12], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.034583"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 21:51:39.036950"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 21:51:39.038688"], ["updated_at", "2014-10-20 21:51:39.039472"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.042355"], ["updated_at", "2014-10-20 21:51:39.042355"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.043420"], ["updated_at", "2014-10-20 21:51:39.043420"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.044307"], ["updated_at", "2014-10-20 21:51:39.044307"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 21:51:39.044891"], ["updated_at", "2014-10-20 21:51:39.045798"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-10-20 21:51:39.053665"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.057819"], ["updated_at", "2014-10-20 21:51:39.057819"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.059607"], ["updated_at", "2014-10-20 21:51:39.059607"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.061084"], ["updated_at", "2014-10-20 21:51:39.061084"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 21:51:39.061953"], ["updated_at", "2014-10-20 21:51:39.063006"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 21:51:39.067803"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 21:51:39.069698"], ["updated_at", "2014-10-20 21:51:39.070537"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 21:51:39.073334"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.077708"], ["updated_at", "2014-10-20 21:51:39.077708"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.079643"], ["updated_at", "2014-10-20 21:51:39.079643"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.081145"], ["updated_at", "2014-10-20 21:51:39.081145"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.083644"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.083644"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.090547"], ["updated_at", "2014-10-20 21:51:39.090547"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.092522"], ["updated_at", "2014-10-20 21:51:39.092522"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.094079"], ["updated_at", "2014-10-20 21:51:39.094079"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.096596"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.096596"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.106343"], ["updated_at", "2014-10-20 21:51:39.106343"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.107501"], ["updated_at", "2014-10-20 21:51:39.107501"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.108477"], ["updated_at", "2014-10-20 21:51:39.108477"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.110355"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.110355"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 21:51:39.114692"], ["updated_at", "2014-10-20 21:51:39.115638"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.119440"], ["updated_at", "2014-10-20 21:51:39.119440"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.120678"], ["updated_at", "2014-10-20 21:51:39.120678"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.121695"], ["updated_at", "2014-10-20 21:51:39.121695"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.123361"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.123361"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.126862"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.126862"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-10-20 21:51:39.131237"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.131237"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-10-20 21:51:39.135279"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.135279"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.138418"], ["updated_at", "2014-10-20 21:51:39.138418"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.139516"], ["updated_at", "2014-10-20 21:51:39.139516"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.140448"], ["updated_at", "2014-10-20 21:51:39.140448"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.142105"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.142105"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.149213"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.149213"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.155822"], ["updated_at", "2014-10-20 21:51:39.155822"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.156957"], ["updated_at", "2014-10-20 21:51:39.156957"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.157945"], ["updated_at", "2014-10-20 21:51:39.157945"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.159612"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.159612"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.165835"], ["updated_at", "2014-10-20 21:51:39.165835"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.169995"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.169995"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.174777"], ["updated_at", "2014-10-20 21:51:39.174777"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.175974"], ["updated_at", "2014-10-20 21:51:39.175974"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.176943"], ["updated_at", "2014-10-20 21:51:39.176943"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.178546"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.178546"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.190755"], ["updated_at", "2014-10-20 21:51:39.190755"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.191993"], ["updated_at", "2014-10-20 21:51:39.191993"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.192976"], ["updated_at", "2014-10-20 21:51:39.192976"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.195130"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.195130"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.207487"], ["updated_at", "2014-10-20 21:51:39.207487"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.211936"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.211936"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.217037"], ["updated_at", "2014-10-20 21:51:39.217037"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.218194"], ["updated_at", "2014-10-20 21:51:39.218194"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.219182"], ["updated_at", "2014-10-20 21:51:39.219182"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.220780"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.220780"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.225644"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.2ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.239094"], ["updated_at", "2014-10-20 21:51:39.239094"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.240293"], ["updated_at", "2014-10-20 21:51:39.240293"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.241294"], ["updated_at", "2014-10-20 21:51:39.241294"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.242956"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.242956"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.247961') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 21:51:39.247961"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.249329"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.254538"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.254538"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 21:51:39.255963"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.260776"], ["updated_at", "2014-10-20 21:51:39.260776"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.261873"], ["updated_at", "2014-10-20 21:51:39.261873"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.262809"], ["updated_at", "2014-10-20 21:51:39.262809"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.264354"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.264354"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.267776') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 21:51:39.267776"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.268739"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.270507"], ["updated_at", "2014-10-20 21:51:39.270507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.271964"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.271964"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-10-20 21:51:39.273584"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.275701') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 21:51:39.275701"], ["editor_id", 13], ["updated_at", "2014-10-20 21:51:39.276646"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 21:51:39.279933"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.282649') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 21:51:39.282649"], ["editor_id", 13], ["updated_at", "2014-10-20 21:51:39.283723"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.286606"], ["updated_at", "2014-10-20 21:51:39.286606"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.287705"], ["updated_at", "2014-10-20 21:51:39.287705"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.288648"], ["updated_at", "2014-10-20 21:51:39.288648"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.290245"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.290245"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.290893') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 21:51:39.290893"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.291736"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-10-20 21:51:39.298288"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.302159"], ["updated_at", "2014-10-20 21:51:39.302159"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.302727') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 21:51:39.302727"], ["editor_id", 13], ["updated_at", "2014-10-20 21:51:39.303584"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.307307"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.307307"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 21:51:39.309162"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.309625') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 21:51:39.309625"], ["updated_at", "2014-10-20 21:51:39.310367"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.315563"], ["updated_at", "2014-10-20 21:51:39.315563"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.316839"], ["updated_at", "2014-10-20 21:51:39.316839"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.318059"], ["updated_at", "2014-10-20 21:51:39.318059"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.320518"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.320518"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.321540') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 21:51:39.321540"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 21:51:39.322790"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-10-20 21:51:39.328889"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.331256"], ["updated_at", "2014-10-20 21:51:39.331256"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.333126"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.333126"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.333871') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 21:51:39.333871"], ["updated_at", "2014-10-20 21:51:39.334832"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-10-20 21:51:39.338198"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 21:51:39.339572') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 21:51:39.339572"], ["editor_id", 12], ["updated_at", "2014-10-20 21:51:39.340467"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-10-20 21:51:39.343758"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.346480"], ["updated_at", "2014-10-20 21:51:39.346480"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.347582"], ["updated_at", "2014-10-20 21:51:39.347582"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.348609"], ["updated_at", "2014-10-20 21:51:39.348609"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.350163"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.350163"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.359797"], ["updated_at", "2014-10-20 21:51:39.359797"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.365809"], ["updated_at", "2014-10-20 21:51:39.365809"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.367011"], ["updated_at", "2014-10-20 21:51:39.367011"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.368042"], ["updated_at", "2014-10-20 21:51:39.368042"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.369744"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.369744"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.370664"], ["updated_at", "2014-10-20 21:51:39.370664"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:39.384786"], ["updated_at", "2014-10-20 21:51:39.384786"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 16ms (ActiveRecord: 0.7ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.2ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.8ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 21:51:39.400141"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 21:51:39.406451"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.412557"], ["updated_at", "2014-10-20 21:51:39.412557"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.414539"], ["updated_at", "2014-10-20 21:51:39.414539"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.416039"], ["updated_at", "2014-10-20 21:51:39.416039"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.418609"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.418609"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.427260"], ["updated_at", "2014-10-20 21:51:39.427260"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.433331"], ["updated_at", "2014-10-20 21:51:39.433331"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.435276"], ["updated_at", "2014-10-20 21:51:39.435276"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.436825"], ["updated_at", "2014-10-20 21:51:39.436825"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.439267"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.439267"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.440504"], ["updated_at", "2014-10-20 21:51:39.440504"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:39.445802"], ["updated_at", "2014-10-20 21:51:39.445802"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 8ms (ActiveRecord: 0.8ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 21:51:39.460728"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 21:51:39.466441"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.472333"], ["updated_at", "2014-10-20 21:51:39.472333"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.474419"], ["updated_at", "2014-10-20 21:51:39.474419"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.475932"], ["updated_at", "2014-10-20 21:51:39.475932"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.478453"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.478453"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:39.481212"], ["updated_at", "2014-10-20 21:51:39.481212"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.490547"], ["updated_at", "2014-10-20 21:51:39.490547"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.496580"], ["updated_at", "2014-10-20 21:51:39.496580"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.498515"], ["updated_at", "2014-10-20 21:51:39.498515"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.500058"], ["updated_at", "2014-10-20 21:51:39.500058"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.502517"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.502517"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.503744"], ["updated_at", "2014-10-20 21:51:39.503744"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 21:51:39.506328"], ["updated_at", "2014-10-20 21:51:39.506328"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 7ms (ActiveRecord: 0.9ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:39.525017"], ["updated_at", "2014-10-20 21:51:39.525017"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.536446"], ["updated_at", "2014-10-20 21:51:39.536446"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.537728"], ["updated_at", "2014-10-20 21:51:39.537728"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.538786"], ["updated_at", "2014-10-20 21:51:39.538786"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 21:51:39.540514"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.540514"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.541493"], ["updated_at", "2014-10-20 21:51:39.541493"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.545023"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.545023"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 21:51:39.548358"], ["updated_at", "2014-10-20 21:51:39.548358"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.549434"], ["updated_at", "2014-10-20 21:51:39.549434"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 21:51:39.550376"], ["updated_at", "2014-10-20 21:51:39.550376"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 21:51:39.551905"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.551905"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 21:51:39.552829"], ["updated_at", "2014-10-20 21:51:39.552829"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 21:51:39.554751"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.554751"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 21:51:39.558106"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 21:51:39.558106"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (1.0ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.209378"], ["updated_at", "2014-10-20 22:44:02.209378"]] [1m[35m (1.3ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.217542"], ["updated_at", "2014-10-20 22:44:02.217542"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.219874"], ["updated_at", "2014-10-20 22:44:02.219874"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.220865"], ["updated_at", "2014-10-20 22:44:02.220865"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.242059"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.242059"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.248527"], ["updated_at", "2014-10-20 22:44:02.248527"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.249737"], ["updated_at", "2014-10-20 22:44:02.249737"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.250664"], ["updated_at", "2014-10-20 22:44:02.250664"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.254151"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.254151"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.259083"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.259083"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.263601"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.263601"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.266453"], ["updated_at", "2014-10-20 22:44:02.266453"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.267559"], ["updated_at", "2014-10-20 22:44:02.267559"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.268471"], ["updated_at", "2014-10-20 22:44:02.268471"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.270338"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.270338"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.278023"], ["updated_at", "2014-10-20 22:44:02.278023"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.279061"], ["updated_at", "2014-10-20 22:44:02.279061"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.279940"], ["updated_at", "2014-10-20 22:44:02.279940"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.281814"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.281814"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.287051"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.287051"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.292862"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.292862"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.302436"], ["updated_at", "2014-10-20 22:44:02.302436"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.303416"], ["updated_at", "2014-10-20 22:44:02.303416"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 1]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (18.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.334345"], ["updated_at", "2014-10-20 22:44:02.334345"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.336178"], ["updated_at", "2014-10-20 22:44:02.336178"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.337465"], ["updated_at", "2014-10-20 22:44:02.337465"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.338442"], ["updated_at", "2014-10-20 22:44:02.338442"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.341250"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.341250"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.343061"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.343061"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.349780"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.349780"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.3ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 14.7ms Sent mail to Undisclosed Recipients (4.5ms) Date: Mon, 20 Oct 2014 17:44:02 -0500 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <544590325a50a_c313fef7582dbe8130e2@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #2 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #2.
[1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.376926"], ["updated_at", "2014-10-20 22:44:02.376926"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.379329"], ["updated_at", "2014-10-20 22:44:02.379329"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.381218"], ["updated_at", "2014-10-20 22:44:02.381218"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.384558"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.384558"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.384558')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.389578"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-10-20 22:44:02.389578"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.384558')[0m [["thread_id", 1]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 22:44:02.393276' WHERE "commontator_subscriptions"."id" = 1 [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.393276')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.396644"], ["updated_at", "2014-10-20 22:44:02.396644"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.398365"], ["updated_at", "2014-10-20 22:44:02.398365"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.399873"], ["updated_at", "2014-10-20 22:44:02.399873"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.402650"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-10-20 22:44:02.402650"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.404132"], ["updated_at", "2014-10-20 22:44:02.404132"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.406684"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-10-20 22:44:02.406684"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.410762"], ["updated_at", "2014-10-20 22:44:02.410762"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.412488"], ["updated_at", "2014-10-20 22:44:02.412488"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.413983"], ["updated_at", "2014-10-20 22:44:02.413983"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.415693"], ["updated_at", "2014-10-20 22:44:02.415693"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.417263"], ["updated_at", "2014-10-20 22:44:02.417263"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.418784"], ["updated_at", "2014-10-20 22:44:02.418784"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4 [["closed_at", "2014-10-20 22:44:02.420100"], ["closer_id", 5], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.421516"]] [1m[36m (0.9ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4 [["closed_at", nil], ["updated_at", "2014-10-20 22:44:02.424349"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.426022"], ["updated_at", "2014-10-20 22:44:02.426022"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.427788"], ["updated_at", "2014-10-20 22:44:02.427788"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.429371"], ["updated_at", "2014-10-20 22:44:02.429371"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.432360"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-10-20 22:44:02.432360"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.433821"], ["updated_at", "2014-10-20 22:44:02.433821"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.436530"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-10-20 22:44:02.436530"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 5]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.439403"], ["updated_at", "2014-10-20 22:44:02.439403"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.441012"], ["updated_at", "2014-10-20 22:44:02.441012"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.442482"], ["updated_at", "2014-10-20 22:44:02.442482"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.444925"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-10-20 22:44:02.444925"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.447178"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-10-20 22:44:02.447178"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 6]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.449907"], ["updated_at", "2014-10-20 22:44:02.449907"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.451573"], ["updated_at", "2014-10-20 22:44:02.451573"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.453167"], ["updated_at", "2014-10-20 22:44:02.453167"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 9 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.455497"], ["creator_id", 9], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-10-20 22:44:02.455497"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7[0m [["closed_at", "2014-10-20 22:44:02.457396"], ["closer_id", 9], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.458371"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 8], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-10-20 22:44:02.462968"]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.464070"], ["updated_at", "2014-10-20 22:44:02.464070"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 7]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 8], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1 [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.467951"], ["updated_at", "2014-10-20 22:44:02.467951"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.469642"], ["updated_at", "2014-10-20 22:44:02.469642"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.471132"], ["updated_at", "2014-10-20 22:44:02.471132"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 9 [["commontable_id", nil], ["updated_at", "2014-10-20 22:44:02.473038"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.476266"], ["updated_at", "2014-10-20 22:44:02.476266"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.477296"], ["updated_at", "2014-10-20 22:44:02.477296"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.478208"], ["updated_at", "2014-10-20 22:44:02.478208"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.479694"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.479694"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.479694')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.481968"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.481968"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.479694')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.485359"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.485359"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.479694')[0m [["thread_id", 10]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-10-20 22:44:02.487824' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-10-20 22:44:02.487824') [["thread_id", 10]] [1m[36m (0.8ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.493151"], ["updated_at", "2014-10-20 22:44:02.493151"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.494470"], ["updated_at", "2014-10-20 22:44:02.494470"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.495797"], ["updated_at", "2014-10-20 22:44:02.495797"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.497932"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.497932"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.506985"], ["updated_at", "2014-10-20 22:44:02.506985"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.508974"], ["updated_at", "2014-10-20 22:44:02.508974"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.510513"], ["updated_at", "2014-10-20 22:44:02.510513"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.513157"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.513157"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.528291"], ["updated_at", "2014-10-20 22:44:02.528291"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.529483"], ["updated_at", "2014-10-20 22:44:02.529483"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.530405"], ["updated_at", "2014-10-20 22:44:02.530405"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.532037"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.532037"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 22:44:02.535040"], ["updated_at", "2014-10-20 22:44:02.535880"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.539191"], ["updated_at", "2014-10-20 22:44:02.539191"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.540367"], ["updated_at", "2014-10-20 22:44:02.540367"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.541448"], ["updated_at", "2014-10-20 22:44:02.541448"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.543088"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.543088"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.546400"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.546400"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Another thing"], ["created_at", "2014-10-20 22:44:02.550467"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.550467"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "And this too"], ["created_at", "2014-10-20 22:44:02.554237"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.554237"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.557708"], ["updated_at", "2014-10-20 22:44:02.557708"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.559029"], ["updated_at", "2014-10-20 22:44:02.559029"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.560194"], ["updated_at", "2014-10-20 22:44:02.560194"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.562613"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.562613"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.571409"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.571409"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.579731"], ["updated_at", "2014-10-20 22:44:02.579731"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.580830"], ["updated_at", "2014-10-20 22:44:02.580830"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.581765"], ["updated_at", "2014-10-20 22:44:02.581765"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.583296"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.583296"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.587793"], ["updated_at", "2014-10-20 22:44:02.587793"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.591308"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.591308"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.595577"], ["updated_at", "2014-10-20 22:44:02.595577"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.596640"], ["updated_at", "2014-10-20 22:44:02.596640"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.597547"], ["updated_at", "2014-10-20 22:44:02.597547"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.599050"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.599050"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.610071"], ["updated_at", "2014-10-20 22:44:02.610071"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.611124"], ["updated_at", "2014-10-20 22:44:02.611124"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.612024"], ["updated_at", "2014-10-20 22:44:02.612024"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.613707"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.613707"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.618837"], ["updated_at", "2014-10-20 22:44:02.618837"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.622688"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.622688"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.628292"], ["updated_at", "2014-10-20 22:44:02.628292"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.629438"], ["updated_at", "2014-10-20 22:44:02.629438"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.630359"], ["updated_at", "2014-10-20 22:44:02.630359"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.631922"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.631922"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.636292"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.649201"], ["updated_at", "2014-10-20 22:44:02.649201"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.650496"], ["updated_at", "2014-10-20 22:44:02.650496"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.651523"], ["updated_at", "2014-10-20 22:44:02.651523"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.653307"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.653307"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.658683') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 22:44:02.658683"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.660099"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.665812"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.665812"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-10-20 22:44:02.667490"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.672909"], ["updated_at", "2014-10-20 22:44:02.672909"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.675115"], ["updated_at", "2014-10-20 22:44:02.675115"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.676576"], ["updated_at", "2014-10-20 22:44:02.676576"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.678999"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.678999"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.683509') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 22:44:02.683509"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.684589"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.686333"], ["updated_at", "2014-10-20 22:44:02.686333"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.687732"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.687732"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 22:44:02.689200"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.691057') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 22:44:02.691057"], ["editor_id", 12], ["updated_at", "2014-10-20 22:44:02.691985"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 11], ["updated_at", "2014-10-20 22:44:02.694148"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.696182') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 22:44:02.696182"], ["editor_id", 12], ["updated_at", "2014-10-20 22:44:02.697139"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.699762"], ["updated_at", "2014-10-20 22:44:02.699762"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.700852"], ["updated_at", "2014-10-20 22:44:02.700852"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.701771"], ["updated_at", "2014-10-20 22:44:02.701771"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.703376"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.703376"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.704041') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 22:44:02.704041"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.704882"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 22:44:02.717717"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.722114"], ["updated_at", "2014-10-20 22:44:02.722114"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.722758') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 22:44:02.722758"], ["editor_id", 12], ["updated_at", "2014-10-20 22:44:02.723742"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.727781"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.727781"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 11], ["updated_at", "2014-10-20 22:44:02.729632"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.730109') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 22:44:02.730109"], ["updated_at", "2014-10-20 22:44:02.730877"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.736083"], ["updated_at", "2014-10-20 22:44:02.736083"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.737187"], ["updated_at", "2014-10-20 22:44:02.737187"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.738096"], ["updated_at", "2014-10-20 22:44:02.738096"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.739651"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.739651"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.740286') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 22:44:02.740286"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.741107"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 22:44:02.745945"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.747504"], ["updated_at", "2014-10-20 22:44:02.747504"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.749017"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.749017"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.749682') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-10-20 22:44:02.749682"], ["updated_at", "2014-10-20 22:44:02.750473"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 22:44:02.753274"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:02.754448') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-10-20 22:44:02.754448"], ["editor_id", 11], ["updated_at", "2014-10-20 22:44:02.755221"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-10-20 22:44:02.758143"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.760607"], ["updated_at", "2014-10-20 22:44:02.760607"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.761695"], ["updated_at", "2014-10-20 22:44:02.761695"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.762621"], ["updated_at", "2014-10-20 22:44:02.762621"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.764181"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.764181"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.773338"], ["updated_at", "2014-10-20 22:44:02.773338"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (1.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.781339"], ["updated_at", "2014-10-20 22:44:02.781339"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.782749"], ["updated_at", "2014-10-20 22:44:02.782749"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.783732"], ["updated_at", "2014-10-20 22:44:02.783732"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.785811"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.785811"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.786823"], ["updated_at", "2014-10-20 22:44:02.786823"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.795176"], ["updated_at", "2014-10-20 22:44:02.795176"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 10ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 22:44:02.808184"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 22:44:02.813671"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.819409"], ["updated_at", "2014-10-20 22:44:02.819409"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.821140"], ["updated_at", "2014-10-20 22:44:02.821140"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.822476"], ["updated_at", "2014-10-20 22:44:02.822476"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.825070"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.825070"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.833063"], ["updated_at", "2014-10-20 22:44:02.833063"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.838649"], ["updated_at", "2014-10-20 22:44:02.838649"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.839780"], ["updated_at", "2014-10-20 22:44:02.839780"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.840704"], ["updated_at", "2014-10-20 22:44:02.840704"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.842291"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.842291"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.843152"], ["updated_at", "2014-10-20 22:44:02.843152"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.847278"], ["updated_at", "2014-10-20 22:44:02.847278"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-10-20 22:44:02.860841"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-10-20 22:44:02.866506"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.871818"], ["updated_at", "2014-10-20 22:44:02.871818"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.872994"], ["updated_at", "2014-10-20 22:44:02.872994"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.873946"], ["updated_at", "2014-10-20 22:44:02.873946"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.875649"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.875649"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 11 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.877795"], ["updated_at", "2014-10-20 22:44:02.877795"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 11], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.892553"], ["updated_at", "2014-10-20 22:44:02.892553"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.898036"], ["updated_at", "2014-10-20 22:44:02.898036"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.899101"], ["updated_at", "2014-10-20 22:44:02.899101"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.900029"], ["updated_at", "2014-10-20 22:44:02.900029"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.901638"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.901638"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.902502"], ["updated_at", "2014-10-20 22:44:02.902502"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-10-20 22:44:02.904320"], ["updated_at", "2014-10-20 22:44:02.904320"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.2ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.9ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.921002"], ["updated_at", "2014-10-20 22:44:02.921002"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.932603"], ["updated_at", "2014-10-20 22:44:02.932603"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.933732"], ["updated_at", "2014-10-20 22:44:02.933732"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.934691"], ["updated_at", "2014-10-20 22:44:02.934691"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:02.936331"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.936331"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.937492"], ["updated_at", "2014-10-20 22:44:02.937492"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.941311"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.941311"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.944674"], ["updated_at", "2014-10-20 22:44:02.944674"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.945764"], ["updated_at", "2014-10-20 22:44:02.945764"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.946720"], ["updated_at", "2014-10-20 22:44:02.946720"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:02.948338"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.948338"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.949263"], ["updated_at", "2014-10-20 22:44:02.949263"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-10-20 22:44:02.951309"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.951309"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-10-20 22:44:02.954645"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:02.954645"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.958380"], ["updated_at", "2014-10-20 22:44:02.958380"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.961348"], ["updated_at", "2014-10-20 22:44:02.961348"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.962401"], ["updated_at", "2014-10-20 22:44:02.962401"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.963308"], ["updated_at", "2014-10-20 22:44:02.963308"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.968936"], ["updated_at", "2014-10-20 22:44:02.968936"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.970026"], ["updated_at", "2014-10-20 22:44:02.970026"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.970933"], ["updated_at", "2014-10-20 22:44:02.970933"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.2ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.982155"], ["updated_at", "2014-10-20 22:44:02.982155"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.983261"], ["updated_at", "2014-10-20 22:44:02.983261"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.984170"], ["updated_at", "2014-10-20 22:44:02.984170"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 22:44:02.988816"], ["updated_at", "2014-10-20 22:44:02.989700"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:02.993781"], ["updated_at", "2014-10-20 22:44:02.993781"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:02.994985"], ["updated_at", "2014-10-20 22:44:02.994985"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:02.995911"], ["updated_at", "2014-10-20 22:44:02.995911"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 22:44:02.998032"], ["closer_id", 12], ["closer_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:02.998854"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 22:44:03.000933"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 22:44:03.002396"], ["updated_at", "2014-10-20 22:44:03.003204"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.005848"], ["updated_at", "2014-10-20 22:44:03.005848"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.007549"], ["updated_at", "2014-10-20 22:44:03.007549"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.008564"], ["updated_at", "2014-10-20 22:44:03.008564"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", "2014-10-20 22:44:03.009164"], ["updated_at", "2014-10-20 22:44:03.009874"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["closed_at", nil], ["updated_at", "2014-10-20 22:44:03.015711"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.019236"], ["updated_at", "2014-10-20 22:44:03.019236"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.020359"], ["updated_at", "2014-10-20 22:44:03.020359"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.021281"], ["updated_at", "2014-10-20 22:44:03.021281"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 22:44:03.021898"], ["updated_at", "2014-10-20 22:44:03.022564"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 22:44:03.025112"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-10-20 22:44:03.026379"], ["updated_at", "2014-10-20 22:44:03.026970"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-10-20 22:44:03.029230"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.032667"], ["updated_at", "2014-10-20 22:44:03.032667"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.033744"], ["updated_at", "2014-10-20 22:44:03.033744"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.034687"], ["updated_at", "2014-10-20 22:44:03.034687"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.036410"], ["updated_at", "2014-10-20 22:44:03.036410"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.037418"], ["updated_at", "2014-10-20 22:44:03.037418"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.038273"], ["updated_at", "2014-10-20 22:44:03.038273"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:03.039908"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:03.039908"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:03.041457"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.043014"], ["updated_at", "2014-10-20 22:44:03.043014"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.044764"], ["updated_at", "2014-10-20 22:44:03.044764"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.045741"], ["updated_at", "2014-10-20 22:44:03.045741"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-10-20 22:44:03.046619') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.047733"], ["updated_at", "2014-10-20 22:44:03.047733"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-10-20 22:44:03.048246"], ["creator_id", 12], ["creator_type", "DummyUser"], ["deleted_at", "2014-10-20 22:44:03.046619"], ["editor_id", 13], ["editor_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:03.048246"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-10-20 22:44:03.049897"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-10-20 22:44:03.051420"], ["updated_at", "2014-10-20 22:44:03.051420"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.052432"], ["updated_at", "2014-10-20 22:44:03.052432"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-10-20 22:44:03.053418"], ["updated_at", "2014-10-20 22:44:03.053418"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-10-20 22:44:03.054983"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-10-20 22:44:03.054983"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-10-20 22:44:03.056605"], ["updated_at", "2014-10-20 22:44:03.056605"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 13], ["editor_type", "DummyUser"], ["updated_at", "2014-10-20 22:44:03.057958"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (1.3ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.413209"], ["updated_at", "2014-11-17 16:56:51.413209"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.438140"], ["updated_at", "2014-11-17 16:56:51.438140"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.450929"], ["updated_at", "2014-11-17 16:56:51.450929"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.463864"], ["updated_at", "2014-11-17 16:56:51.463864"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.466380"], ["updated_at", "2014-11-17 16:56:51.466380"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.468935"], ["updated_at", "2014-11-17 16:56:51.468935"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.471710"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.471710"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.474348"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.477175"], ["updated_at", "2014-11-17 16:56:51.477175"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.479333"], ["updated_at", "2014-11-17 16:56:51.479333"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.481685"], ["updated_at", "2014-11-17 16:56:51.481685"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:51.482993') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.484361"], ["updated_at", "2014-11-17 16:56:51.484361"]] [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.485024"], ["creator_id", 1], ["creator_type", "DummyUser"], ["deleted_at", "2014-11-17 16:56:51.482993"], ["editor_id", 2], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.485024"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:56:51.487139"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.488775"], ["updated_at", "2014-11-17 16:56:51.488775"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.490078"], ["updated_at", "2014-11-17 16:56:51.490078"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.491563"], ["updated_at", "2014-11-17 16:56:51.491563"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.493088"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.493088"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.494676"], ["updated_at", "2014-11-17 16:56:51.494676"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.496019"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.499542"], ["updated_at", "2014-11-17 16:56:51.499542"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.505075"], ["updated_at", "2014-11-17 16:56:51.505075"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.506384"], ["updated_at", "2014-11-17 16:56:51.506384"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.507922"], ["updated_at", "2014-11-17 16:56:51.507922"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:51.526645"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.526645"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.532143"], ["updated_at", "2014-11-17 16:56:51.532143"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.533687"], ["updated_at", "2014-11-17 16:56:51.533687"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.535259"], ["updated_at", "2014-11-17 16:56:51.535259"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.538813"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.538813"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.544541"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.544541"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.549717"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.549717"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.552696"], ["updated_at", "2014-11-17 16:56:51.552696"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.553947"], ["updated_at", "2014-11-17 16:56:51.553947"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.555479"], ["updated_at", "2014-11-17 16:56:51.555479"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:51.557559"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.557559"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.565609"], ["updated_at", "2014-11-17 16:56:51.565609"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.566850"], ["updated_at", "2014-11-17 16:56:51.566850"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.568345"], ["updated_at", "2014-11-17 16:56:51.568345"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.570331"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.570331"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.582075"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.582075"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.587115"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:56:51.587115"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.592502"], ["updated_at", "2014-11-17 16:56:51.592502"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.594748"], ["updated_at", "2014-11-17 16:56:51.594748"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.598148"], ["updated_at", "2014-11-17 16:56:51.598148"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.600035"], ["updated_at", "2014-11-17 16:56:51.600035"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.601488"], ["updated_at", "2014-11-17 16:56:51.601488"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2 [["commontable_id", nil], ["updated_at", "2014-11-17 16:56:51.603339"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.605387"], ["updated_at", "2014-11-17 16:56:51.605387"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.607190"], ["updated_at", "2014-11-17 16:56:51.607190"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.608615"], ["updated_at", "2014-11-17 16:56:51.608615"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.611441"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-11-17 16:56:51.611441"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.612954"], ["updated_at", "2014-11-17 16:56:51.612954"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.615475"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-11-17 16:56:51.615475"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.619754"], ["updated_at", "2014-11-17 16:56:51.619754"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.621540"], ["updated_at", "2014-11-17 16:56:51.621540"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.622969"], ["updated_at", "2014-11-17 16:56:51.622969"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 5 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.626427"], ["creator_id", 5], ["creator_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 16:56:51.626427"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.3ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4 [["closed_at", "2014-11-17 16:56:51.628355"], ["closer_id", 5], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.629172"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 4]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 4]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 4[0m [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-11-17 16:56:51.635040"]] [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.636257"], ["updated_at", "2014-11-17 16:56:51.636257"]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 4]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 4]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 4], ["commontable_type", "DummyModel"]] [1m[36mCommontator::Comment Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 5]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.640777"], ["updated_at", "2014-11-17 16:56:51.640777"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.642576"], ["updated_at", "2014-11-17 16:56:51.642576"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.644013"], ["updated_at", "2014-11-17 16:56:51.644013"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:51.646780"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 16:56:51.646780"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.648289"], ["updated_at", "2014-11-17 16:56:51.648289"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:51.650856"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 16:56:51.650856"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 6]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.653759"], ["updated_at", "2014-11-17 16:56:51.653759"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.655562"], ["updated_at", "2014-11-17 16:56:51.655562"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.657010"], ["updated_at", "2014-11-17 16:56:51.657010"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.659687"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 16:56:51.659687"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:51.659687') [["thread_id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.664769"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 16:56:51.664769"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:51.659687') [["thread_id", 7]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:56:51.668568' WHERE "commontator_subscriptions"."id" = 5[0m [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:51.668568') [["thread_id", 7]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.673149"], ["updated_at", "2014-11-17 16:56:51.673149"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.675823"], ["updated_at", "2014-11-17 16:56:51.675823"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.678049"], ["updated_at", "2014-11-17 16:56:51.678049"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.679911"], ["updated_at", "2014-11-17 16:56:51.679911"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.681796"], ["updated_at", "2014-11-17 16:56:51.681796"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.683279"], ["updated_at", "2014-11-17 16:56:51.683279"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 9 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.685564"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:56:51.685564"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 9 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:56:51.687822"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:56:51.687822"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 9]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 9]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.690532"], ["updated_at", "2014-11-17 16:56:51.690532"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.692284"], ["updated_at", "2014-11-17 16:56:51.692284"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.693800"], ["updated_at", "2014-11-17 16:56:51.693800"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-11-17 16:56:51.695119"], ["closer_id", 11], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.696019"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-11-17 16:56:51.697999"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.703514"], ["updated_at", "2014-11-17 16:56:51.703514"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.705296"], ["updated_at", "2014-11-17 16:56:51.705296"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.706908"], ["updated_at", "2014-11-17 16:56:51.706908"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.707804"], ["updated_at", "2014-11-17 16:56:51.707804"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:51.709972"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.709972"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:51.711851"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.711851"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.713420"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.713420"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (3.5ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 25.6ms Sent mail to Undisclosed Recipients (6.4ms) Date: Mon, 17 Nov 2014 10:56:51 -0600 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <546a28d3b678d_5aba3fe29a02dbec75876@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #12 posted a comment on DummyModel #10 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #10.
[1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.755409"], ["updated_at", "2014-11-17 16:56:51.755409"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.757068"], ["updated_at", "2014-11-17 16:56:51.757068"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.758757"], ["updated_at", "2014-11-17 16:56:51.758757"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.764933"], ["updated_at", "2014-11-17 16:56:51.764933"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.767244"], ["updated_at", "2014-11-17 16:56:51.767244"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.769617"], ["updated_at", "2014-11-17 16:56:51.769617"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.782943"], ["updated_at", "2014-11-17 16:56:51.782943"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.785229"], ["updated_at", "2014-11-17 16:56:51.785229"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.787600"], ["updated_at", "2014-11-17 16:56:51.787600"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 16:56:51.798821"], ["updated_at", "2014-11-17 16:56:51.799577"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.803345"], ["updated_at", "2014-11-17 16:56:51.803345"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.804653"], ["updated_at", "2014-11-17 16:56:51.804653"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.806128"], ["updated_at", "2014-11-17 16:56:51.806128"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 16:56:51.808084"], ["closer_id", 12], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.808797"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", nil], ["updated_at", "2014-11-17 16:56:51.810779"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 16:56:51.812227"], ["updated_at", "2014-11-17 16:56:51.812999"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.815388"], ["updated_at", "2014-11-17 16:56:51.815388"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.816672"], ["updated_at", "2014-11-17 16:56:51.816672"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.818209"], ["updated_at", "2014-11-17 16:56:51.818209"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 16:56:51.818816"], ["updated_at", "2014-11-17 16:56:51.819398"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", nil], ["updated_at", "2014-11-17 16:56:51.825070"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.828597"], ["updated_at", "2014-11-17 16:56:51.828597"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.829776"], ["updated_at", "2014-11-17 16:56:51.829776"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.831209"], ["updated_at", "2014-11-17 16:56:51.831209"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 16:56:51.831814"], ["updated_at", "2014-11-17 16:56:51.832385"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", nil], ["updated_at", "2014-11-17 16:56:51.834942"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 16:56:51.836157"], ["updated_at", "2014-11-17 16:56:51.836766"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", nil], ["updated_at", "2014-11-17 16:56:51.839195"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.842465"], ["updated_at", "2014-11-17 16:56:51.842465"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.844477"], ["updated_at", "2014-11-17 16:56:51.844477"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.846203"], ["updated_at", "2014-11-17 16:56:51.846203"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.847912"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.847912"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.853210"], ["updated_at", "2014-11-17 16:56:51.853210"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.854584"], ["updated_at", "2014-11-17 16:56:51.854584"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.856081"], ["updated_at", "2014-11-17 16:56:51.856081"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.857920"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.857920"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.866817"], ["updated_at", "2014-11-17 16:56:51.866817"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.868987"], ["updated_at", "2014-11-17 16:56:51.868987"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.871353"], ["updated_at", "2014-11-17 16:56:51.871353"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:51.873691"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.873691"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 16:56:51.877371"], ["updated_at", "2014-11-17 16:56:51.878256"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.882407"], ["updated_at", "2014-11-17 16:56:51.882407"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.883796"], ["updated_at", "2014-11-17 16:56:51.883796"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.885348"], ["updated_at", "2014-11-17 16:56:51.885348"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.886958"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.886958"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:51.890330"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.890330"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-11-17 16:56:51.894673"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.894673"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-11-17 16:56:51.898695"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.898695"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.901769"], ["updated_at", "2014-11-17 16:56:51.901769"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.902979"], ["updated_at", "2014-11-17 16:56:51.902979"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.904458"], ["updated_at", "2014-11-17 16:56:51.904458"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.906090"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.906090"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:56:51.913021"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.913021"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.919582"], ["updated_at", "2014-11-17 16:56:51.919582"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.920863"], ["updated_at", "2014-11-17 16:56:51.920863"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.922411"], ["updated_at", "2014-11-17 16:56:51.922411"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.923975"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.923975"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.929685"], ["updated_at", "2014-11-17 16:56:51.929685"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:51.933552"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.933552"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.938049"], ["updated_at", "2014-11-17 16:56:51.938049"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.939264"], ["updated_at", "2014-11-17 16:56:51.939264"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.940755"], ["updated_at", "2014-11-17 16:56:51.940755"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.942334"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.942334"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.954467"], ["updated_at", "2014-11-17 16:56:51.954467"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.956822"], ["updated_at", "2014-11-17 16:56:51.956822"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.959384"], ["updated_at", "2014-11-17 16:56:51.959384"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.962047"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.962047"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.968734"], ["updated_at", "2014-11-17 16:56:51.968734"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 6ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:56:51.977812"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.977812"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:51.983559"], ["updated_at", "2014-11-17 16:56:51.983559"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:51.985858"], ["updated_at", "2014-11-17 16:56:51.985858"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:51.988289"], ["updated_at", "2014-11-17 16:56:51.988289"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:51.990695"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:51.990695"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:51.996776"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.008076"], ["updated_at", "2014-11-17 16:56:52.008076"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.009352"], ["updated_at", "2014-11-17 16:56:52.009352"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.010849"], ["updated_at", "2014-11-17 16:56:52.010849"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.012420"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.012420"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.017123') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:56:52.017123"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:52.018517"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.023788"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.023788"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 16:56:52.025240"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.029938"], ["updated_at", "2014-11-17 16:56:52.029938"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.031149"], ["updated_at", "2014-11-17 16:56:52.031149"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.032683"], ["updated_at", "2014-11-17 16:56:52.032683"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.034264"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.034264"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.037750') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:56:52.037750"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:52.038672"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.040347"], ["updated_at", "2014-11-17 16:56:52.040347"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.041809"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.041809"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:56:52.043449"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.045545') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:56:52.045545"], ["editor_id", 13], ["updated_at", "2014-11-17 16:56:52.046638"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 16:56:52.049359"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.051584') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:56:52.051584"], ["editor_id", 13], ["updated_at", "2014-11-17 16:56:52.052483"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.055683"], ["updated_at", "2014-11-17 16:56:52.055683"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.057313"], ["updated_at", "2014-11-17 16:56:52.057313"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.059293"], ["updated_at", "2014-11-17 16:56:52.059293"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.061792"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.061792"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.062714') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:56:52.062714"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:52.063888"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:56:52.071125"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.075123"], ["updated_at", "2014-11-17 16:56:52.075123"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.075663') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:56:52.075663"], ["editor_id", 13], ["updated_at", "2014-11-17 16:56:52.076501"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.080399"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.080399"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 16:56:52.082232"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.082707') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:56:52.082707"], ["updated_at", "2014-11-17 16:56:52.083469"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.089186"], ["updated_at", "2014-11-17 16:56:52.089186"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.091562"], ["updated_at", "2014-11-17 16:56:52.091562"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.094338"], ["updated_at", "2014-11-17 16:56:52.094338"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.096788"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.096788"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.097728') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:56:52.097728"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:56:52.098815"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:56:52.104285"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.105904"], ["updated_at", "2014-11-17 16:56:52.105904"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.107460"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.107460"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.108114') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:56:52.108114"], ["updated_at", "2014-11-17 16:56:52.108940"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-11-17 16:56:52.112020"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:56:52.113267') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:56:52.113267"], ["editor_id", 12], ["updated_at", "2014-11-17 16:56:52.114105"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-11-17 16:56:52.117067"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.119652"], ["updated_at", "2014-11-17 16:56:52.119652"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.120993"], ["updated_at", "2014-11-17 16:56:52.120993"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.122506"], ["updated_at", "2014-11-17 16:56:52.122506"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.124058"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.124058"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.133285"], ["updated_at", "2014-11-17 16:56:52.133285"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.138786"], ["updated_at", "2014-11-17 16:56:52.138786"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.140111"], ["updated_at", "2014-11-17 16:56:52.140111"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.141684"], ["updated_at", "2014-11-17 16:56:52.141684"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.143346"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.143346"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.144250"], ["updated_at", "2014-11-17 16:56:52.144250"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:52.157907"], ["updated_at", "2014-11-17 16:56:52.157907"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 16ms (ActiveRecord: 0.7ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:56:52.175819"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:56:52.182916"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.188967"], ["updated_at", "2014-11-17 16:56:52.188967"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.191286"], ["updated_at", "2014-11-17 16:56:52.191286"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.193708"], ["updated_at", "2014-11-17 16:56:52.193708"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.196103"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.196103"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.204352"], ["updated_at", "2014-11-17 16:56:52.204352"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.209750"], ["updated_at", "2014-11-17 16:56:52.209750"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.210945"], ["updated_at", "2014-11-17 16:56:52.210945"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.212433"], ["updated_at", "2014-11-17 16:56:52.212433"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.214077"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.214077"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.214939"], ["updated_at", "2014-11-17 16:56:52.214939"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:52.219076"], ["updated_at", "2014-11-17 16:56:52.219076"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:56:52.232788"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:56:52.238534"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.243674"], ["updated_at", "2014-11-17 16:56:52.243674"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.244969"], ["updated_at", "2014-11-17 16:56:52.244969"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.246509"], ["updated_at", "2014-11-17 16:56:52.246509"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.248165"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.248165"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:52.250228"], ["updated_at", "2014-11-17 16:56:52.250228"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.259425"], ["updated_at", "2014-11-17 16:56:52.259425"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.264760"], ["updated_at", "2014-11-17 16:56:52.264760"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.265985"], ["updated_at", "2014-11-17 16:56:52.265985"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.267479"], ["updated_at", "2014-11-17 16:56:52.267479"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.269128"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.269128"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.270000"], ["updated_at", "2014-11-17 16:56:52.270000"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:52.271846"], ["updated_at", "2014-11-17 16:56:52.271846"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:52.289347"], ["updated_at", "2014-11-17 16:56:52.289347"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.301109"], ["updated_at", "2014-11-17 16:56:52.301109"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.302526"], ["updated_at", "2014-11-17 16:56:52.302526"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.304166"], ["updated_at", "2014-11-17 16:56:52.304166"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:56:52.305803"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.305803"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.306751"], ["updated_at", "2014-11-17 16:56:52.306751"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.310100"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.310100"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.313224"], ["updated_at", "2014-11-17 16:56:52.313224"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.314466"], ["updated_at", "2014-11-17 16:56:52.314466"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.316099"], ["updated_at", "2014-11-17 16:56:52.316099"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.317689"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.317689"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.318616"], ["updated_at", "2014-11-17 16:56:52.318616"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:56:52.320670"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.320670"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.324040"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.324040"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:56:52.328101"], ["updated_at", "2014-11-17 16:56:52.328101"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.334630"], ["updated_at", "2014-11-17 16:56:52.334630"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.336536"], ["updated_at", "2014-11-17 16:56:52.336536"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:56:52.338152"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.338152"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:52.338152')[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:56:52.340535"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.340535"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:52.338152')[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:56:52.344578"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:56:52.344578"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:52.338152')[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:56:52.347187' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:56:52.347187') [["thread_id", 11]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:56:52.355730"], ["updated_at", "2014-11-17 16:56:52.355730"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:56:52.357467"], ["updated_at", "2014-11-17 16:56:52.357467"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 11]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (8.3ms) [1m[36m (0.2ms)[0m [1mrollback transaction[0m [1m[36m (1.9ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (1.0ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.9ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.179954"], ["updated_at", "2014-11-17 16:57:33.179954"]] [1m[35m (1.3ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.189323"], ["updated_at", "2014-11-17 16:57:33.189323"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.201949"], ["updated_at", "2014-11-17 16:57:33.201949"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.210130"], ["updated_at", "2014-11-17 16:57:33.210130"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.221707"], ["updated_at", "2014-11-17 16:57:33.221707"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.223067"], ["updated_at", "2014-11-17 16:57:33.223067"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.224549"], ["updated_at", "2014-11-17 16:57:33.224549"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.226397"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.226397"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.228399"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.230215"], ["updated_at", "2014-11-17 16:57:33.230215"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.231487"], ["updated_at", "2014-11-17 16:57:33.231487"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.233006"], ["updated_at", "2014-11-17 16:57:33.233006"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.233876') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.234827"], ["updated_at", "2014-11-17 16:57:33.234827"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.235282"], ["creator_id", 2], ["creator_type", "DummyUser"], ["deleted_at", "2014-11-17 16:57:33.233876"], ["editor_id", 3], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.235282"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-11-17 16:57:33.236869"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.238270"], ["updated_at", "2014-11-17 16:57:33.238270"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.239392"], ["updated_at", "2014-11-17 16:57:33.239392"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.240765"], ["updated_at", "2014-11-17 16:57:33.240765"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.242253"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.242253"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.243886"], ["updated_at", "2014-11-17 16:57:33.243886"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 3], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.245141"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.252100"], ["updated_at", "2014-11-17 16:57:33.252100"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.253573"], ["updated_at", "2014-11-17 16:57:33.253573"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.255195"], ["updated_at", "2014-11-17 16:57:33.255195"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.261815"], ["updated_at", "2014-11-17 16:57:33.261815"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.263985"], ["updated_at", "2014-11-17 16:57:33.263985"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.265711"], ["updated_at", "2014-11-17 16:57:33.265711"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 9ms (ActiveRecord: 0.5ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.283301"], ["updated_at", "2014-11-17 16:57:33.283301"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.284597"], ["updated_at", "2014-11-17 16:57:33.284597"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.286071"], ["updated_at", "2014-11-17 16:57:33.286071"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 16:57:33.290526"], ["updated_at", "2014-11-17 16:57:33.291131"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.295288"], ["updated_at", "2014-11-17 16:57:33.295288"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.296696"], ["updated_at", "2014-11-17 16:57:33.296696"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.299115"], ["updated_at", "2014-11-17 16:57:33.299115"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:57:33.301589"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.302378"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:57:33.304567"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:57:33.306046"], ["updated_at", "2014-11-17 16:57:33.306717"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.309115"], ["updated_at", "2014-11-17 16:57:33.309115"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.310317"], ["updated_at", "2014-11-17 16:57:33.310317"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.311668"], ["updated_at", "2014-11-17 16:57:33.311668"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 16:57:33.312267"], ["updated_at", "2014-11-17 16:57:33.312824"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-11-17 16:57:33.324734"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.328734"], ["updated_at", "2014-11-17 16:57:33.328734"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.330000"], ["updated_at", "2014-11-17 16:57:33.330000"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.331425"], ["updated_at", "2014-11-17 16:57:33.331425"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:57:33.332001"], ["updated_at", "2014-11-17 16:57:33.332547"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:57:33.335032"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:57:33.336265"], ["updated_at", "2014-11-17 16:57:33.336835"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:57:33.339007"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.342028"], ["updated_at", "2014-11-17 16:57:33.342028"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.343298"], ["updated_at", "2014-11-17 16:57:33.343298"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.344869"], ["updated_at", "2014-11-17 16:57:33.344869"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.346694"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.346694"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.352802"], ["updated_at", "2014-11-17 16:57:33.352802"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.354160"], ["updated_at", "2014-11-17 16:57:33.354160"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.355699"], ["updated_at", "2014-11-17 16:57:33.355699"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.357245"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.357245"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.365436"], ["updated_at", "2014-11-17 16:57:33.365436"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.366646"], ["updated_at", "2014-11-17 16:57:33.366646"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.368042"], ["updated_at", "2014-11-17 16:57:33.368042"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.369613"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.369613"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 16:57:33.372330"], ["updated_at", "2014-11-17 16:57:33.372999"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.376302"], ["updated_at", "2014-11-17 16:57:33.376302"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.377481"], ["updated_at", "2014-11-17 16:57:33.377481"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.378870"], ["updated_at", "2014-11-17 16:57:33.378870"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.380408"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.380408"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.383439"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.383439"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-11-17 16:57:33.388311"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.388311"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-11-17 16:57:33.392252"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.392252"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.395389"], ["updated_at", "2014-11-17 16:57:33.395389"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.397598"], ["updated_at", "2014-11-17 16:57:33.397598"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.399963"], ["updated_at", "2014-11-17 16:57:33.399963"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.402333"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.402333"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.414377"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.414377"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.421963"], ["updated_at", "2014-11-17 16:57:33.421963"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.423804"], ["updated_at", "2014-11-17 16:57:33.423804"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.426194"], ["updated_at", "2014-11-17 16:57:33.426194"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.428535"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.428535"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.435399"], ["updated_at", "2014-11-17 16:57:33.435399"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.439247"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.439247"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.443670"], ["updated_at", "2014-11-17 16:57:33.443670"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.444903"], ["updated_at", "2014-11-17 16:57:33.444903"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.446384"], ["updated_at", "2014-11-17 16:57:33.446384"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.447985"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.447985"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.459407"], ["updated_at", "2014-11-17 16:57:33.459407"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.460616"], ["updated_at", "2014-11-17 16:57:33.460616"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.462208"], ["updated_at", "2014-11-17 16:57:33.462208"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.463753"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.463753"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.468794"], ["updated_at", "2014-11-17 16:57:33.468794"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.472629"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.472629"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.477214"], ["updated_at", "2014-11-17 16:57:33.477214"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.478611"], ["updated_at", "2014-11-17 16:57:33.478611"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.480941"], ["updated_at", "2014-11-17 16:57:33.480941"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.482549"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.482549"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.487225"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.498979"], ["updated_at", "2014-11-17 16:57:33.498979"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.501290"], ["updated_at", "2014-11-17 16:57:33.501290"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.503741"], ["updated_at", "2014-11-17 16:57:33.503741"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.506098"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.506098"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.516588') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 16:57:33.516588"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.518104"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.523370"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.523370"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-11-17 16:57:33.524763"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.529871"], ["updated_at", "2014-11-17 16:57:33.529871"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.532034"], ["updated_at", "2014-11-17 16:57:33.532034"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.534248"], ["updated_at", "2014-11-17 16:57:33.534248"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.536341"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.536341"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.540797') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 16:57:33.540797"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.541866"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.543617"], ["updated_at", "2014-11-17 16:57:33.543617"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.545019"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.545019"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.3ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:57:33.546979"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.549290') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 16:57:33.549290"], ["editor_id", 3], ["updated_at", "2014-11-17 16:57:33.550289"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-11-17 16:57:33.552500"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.554620') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 16:57:33.554620"], ["editor_id", 3], ["updated_at", "2014-11-17 16:57:33.555586"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.558160"], ["updated_at", "2014-11-17 16:57:33.558160"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.559431"], ["updated_at", "2014-11-17 16:57:33.559431"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.560969"], ["updated_at", "2014-11-17 16:57:33.560969"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.562644"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.562644"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.563262') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 16:57:33.563262"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.564062"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:57:33.570478"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.574488"], ["updated_at", "2014-11-17 16:57:33.574488"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.575004') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 16:57:33.575004"], ["editor_id", 3], ["updated_at", "2014-11-17 16:57:33.575857"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.579608"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.579608"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-11-17 16:57:33.581386"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.581835') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 16:57:33.581835"], ["updated_at", "2014-11-17 16:57:33.582542"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.587484"], ["updated_at", "2014-11-17 16:57:33.587484"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.588654"], ["updated_at", "2014-11-17 16:57:33.588654"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.590762"], ["updated_at", "2014-11-17 16:57:33.590762"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.592723"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.592723"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.593488') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 16:57:33.593488"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:33.594362"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:57:33.600550"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.602341"], ["updated_at", "2014-11-17 16:57:33.602341"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.603795"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.603795"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.604462') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 16:57:33.604462"], ["updated_at", "2014-11-17 16:57:33.605273"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-11-17 16:57:33.608329"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:57:33.609506') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 16:57:33.609506"], ["editor_id", 2], ["updated_at", "2014-11-17 16:57:33.610348"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-11-17 16:57:33.613209"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.616341"], ["updated_at", "2014-11-17 16:57:33.616341"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.618544"], ["updated_at", "2014-11-17 16:57:33.618544"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.620812"], ["updated_at", "2014-11-17 16:57:33.620812"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.623086"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.623086"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.633125"], ["updated_at", "2014-11-17 16:57:33.633125"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.638680"], ["updated_at", "2014-11-17 16:57:33.638680"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.640036"], ["updated_at", "2014-11-17 16:57:33.640036"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.641615"], ["updated_at", "2014-11-17 16:57:33.641615"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.643167"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.643167"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.644077"], ["updated_at", "2014-11-17 16:57:33.644077"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.652495"], ["updated_at", "2014-11-17 16:57:33.652495"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 10ms (ActiveRecord: 0.6ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:57:33.666990"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:57:33.672739"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.678104"], ["updated_at", "2014-11-17 16:57:33.678104"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.679463"], ["updated_at", "2014-11-17 16:57:33.679463"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.681078"], ["updated_at", "2014-11-17 16:57:33.681078"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.682723"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.682723"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 7ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.695888"], ["updated_at", "2014-11-17 16:57:33.695888"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.701530"], ["updated_at", "2014-11-17 16:57:33.701530"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.702775"], ["updated_at", "2014-11-17 16:57:33.702775"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.704266"], ["updated_at", "2014-11-17 16:57:33.704266"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.705803"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.705803"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.706659"], ["updated_at", "2014-11-17 16:57:33.706659"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.710798"], ["updated_at", "2014-11-17 16:57:33.710798"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:57:33.724441"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:57:33.729926"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.735672"], ["updated_at", "2014-11-17 16:57:33.735672"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.737995"], ["updated_at", "2014-11-17 16:57:33.737995"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.740390"], ["updated_at", "2014-11-17 16:57:33.740390"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.742700"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.742700"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.745398"], ["updated_at", "2014-11-17 16:57:33.745398"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.754365"], ["updated_at", "2014-11-17 16:57:33.754365"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.759768"], ["updated_at", "2014-11-17 16:57:33.759768"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.760954"], ["updated_at", "2014-11-17 16:57:33.760954"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.763164"], ["updated_at", "2014-11-17 16:57:33.763164"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.765593"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.765593"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.766886"], ["updated_at", "2014-11-17 16:57:33.766886"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.769405"], ["updated_at", "2014-11-17 16:57:33.769405"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.786736"], ["updated_at", "2014-11-17 16:57:33.786736"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.797605"], ["updated_at", "2014-11-17 16:57:33.797605"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.798872"], ["updated_at", "2014-11-17 16:57:33.798872"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.800411"], ["updated_at", "2014-11-17 16:57:33.800411"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.802017"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.802017"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.802941"], ["updated_at", "2014-11-17 16:57:33.802941"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.806173"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.806173"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.809322"], ["updated_at", "2014-11-17 16:57:33.809322"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.810566"], ["updated_at", "2014-11-17 16:57:33.810566"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.812036"], ["updated_at", "2014-11-17 16:57:33.812036"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.813542"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.813542"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.814421"], ["updated_at", "2014-11-17 16:57:33.814421"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.819187"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.819187"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.822778"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:57:33.822778"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.830481"], ["updated_at", "2014-11-17 16:57:33.830481"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.832229"], ["updated_at", "2014-11-17 16:57:33.832229"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.835249"], ["updated_at", "2014-11-17 16:57:33.835249"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.836451"], ["updated_at", "2014-11-17 16:57:33.836451"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.837901"], ["updated_at", "2014-11-17 16:57:33.837901"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.843797"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.843797"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.848888"], ["updated_at", "2014-11-17 16:57:33.848888"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.850414"], ["updated_at", "2014-11-17 16:57:33.850414"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.852178"], ["updated_at", "2014-11-17 16:57:33.852178"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.856000"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.856000"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.861279"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.861279"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.871537"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.871537"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 9ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.875445"], ["updated_at", "2014-11-17 16:57:33.875445"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.877606"], ["updated_at", "2014-11-17 16:57:33.877606"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.880327"], ["updated_at", "2014-11-17 16:57:33.880327"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.883417"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.883417"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.892226"], ["updated_at", "2014-11-17 16:57:33.892226"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.893622"], ["updated_at", "2014-11-17 16:57:33.893622"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.895117"], ["updated_at", "2014-11-17 16:57:33.895117"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.897095"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.897095"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.902244"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.902244"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.906900"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.906900"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.912154"], ["updated_at", "2014-11-17 16:57:33.912154"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.913468"], ["updated_at", "2014-11-17 16:57:33.913468"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.915678"], ["updated_at", "2014-11-17 16:57:33.915678"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.917251"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.917251"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:33.917251')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:33.920192"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.920192"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:33.917251')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:33.923593"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.923593"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:33.917251')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:57:33.926008' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:33.926008') [["thread_id", 2]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.931219"], ["updated_at", "2014-11-17 16:57:33.931219"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.932779"], ["updated_at", "2014-11-17 16:57:33.932779"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (7.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.950829"], ["updated_at", "2014-11-17 16:57:33.950829"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.952514"], ["updated_at", "2014-11-17 16:57:33.952514"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.954205"], ["updated_at", "2014-11-17 16:57:33.954205"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.955007"], ["updated_at", "2014-11-17 16:57:33.955007"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:33.957018"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.957018"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 2 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:33.958775"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.958775"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:33.960421"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 16:57:33.960421"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.1ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 13.4ms Sent mail to Undisclosed Recipients (4.5ms) Date: Mon, 17 Nov 2014 10:57:33 -0600 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <546a28fdeee48_5abe3fd87c82dbf82293@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #2 posted a comment on DummyModel #2 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #2.
[1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.985261"], ["updated_at", "2014-11-17 16:57:33.985261"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.987501"], ["updated_at", "2014-11-17 16:57:33.987501"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.989121"], ["updated_at", "2014-11-17 16:57:33.989121"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2 [["commontable_id", nil], ["updated_at", "2014-11-17 16:57:33.990918"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:33.992895"], ["updated_at", "2014-11-17 16:57:33.992895"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.995195"], ["updated_at", "2014-11-17 16:57:33.995195"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:33.997393"], ["updated_at", "2014-11-17 16:57:33.997393"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:33.999269"], ["updated_at", "2014-11-17 16:57:33.999269"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.001221"], ["updated_at", "2014-11-17 16:57:34.001221"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.002796"], ["updated_at", "2014-11-17 16:57:34.002796"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:34.005863"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 16:57:34.005863"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.007422"], ["updated_at", "2014-11-17 16:57:34.007422"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:57:34.010022"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 16:57:34.010022"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 4]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.012896"], ["updated_at", "2014-11-17 16:57:34.012896"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.014648"], ["updated_at", "2014-11-17 16:57:34.014648"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.016080"], ["updated_at", "2014-11-17 16:57:34.016080"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 5 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:34.018739"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-11-17 16:57:34.018739"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 5]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:34.018739') [["thread_id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 6 AND "commontator_comments"."thread_id" = 5 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:34.023390"], ["creator_id", 6], ["creator_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-11-17 16:57:34.023390"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 5]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:34.018739') [["thread_id", 5]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 5 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:57:34.027165' WHERE "commontator_subscriptions"."id" = 3[0m [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 5]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:57:34.027165') [["thread_id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.031795"], ["updated_at", "2014-11-17 16:57:34.031795"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.033778"], ["updated_at", "2014-11-17 16:57:34.033778"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.035376"], ["updated_at", "2014-11-17 16:57:34.035376"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:57:34.037748"], ["creator_id", 7], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 16:57:34.037748"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:57:34.040006"], ["creator_id", 7], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 16:57:34.040006"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 6]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.042904"], ["updated_at", "2014-11-17 16:57:34.042904"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.044782"], ["updated_at", "2014-11-17 16:57:34.044782"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.046283"], ["updated_at", "2014-11-17 16:57:34.046283"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:57:34.054175"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 16:57:34.054175"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7[0m [["closed_at", "2014-11-17 16:57:34.056023"], ["closer_id", 8], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:34.056973"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 7], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-11-17 16:57:34.061465"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.062513"], ["updated_at", "2014-11-17 16:57:34.062513"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 7]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 7], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1 [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.066508"], ["updated_at", "2014-11-17 16:57:34.066508"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.068561"], ["updated_at", "2014-11-17 16:57:34.068561"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.070058"], ["updated_at", "2014-11-17 16:57:34.070058"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:34.072877"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:57:34.072877"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.074347"], ["updated_at", "2014-11-17 16:57:34.074347"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 10) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:57:34.076888"], ["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:57:34.076888"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:57:34.081985"], ["updated_at", "2014-11-17 16:57:34.081985"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:57:34.083958"], ["updated_at", "2014-11-17 16:57:34.083958"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:57:34.085527"], ["updated_at", "2014-11-17 16:57:34.085527"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-11-17 16:57:34.086924"], ["closer_id", 11], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:57:34.088047"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", nil], ["updated_at", "2014-11-17 16:57:34.090637"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[36m (1.7ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.7ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.507342"], ["updated_at", "2014-11-17 16:58:38.507342"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.523314"], ["updated_at", "2014-11-17 16:58:38.523314"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.530778"], ["updated_at", "2014-11-17 16:58:38.530778"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.531844"], ["updated_at", "2014-11-17 16:58:38.531844"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.542357"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.542357"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.544458"], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.544458"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.551424"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.551424"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.1ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (5.0ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 17.9ms Sent mail to Undisclosed Recipients (4.1ms) Date: Mon, 17 Nov 2014 10:58:38 -0600 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <546a293e8c4cf_5ac63fc39202dbdc294eb@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #1 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #1.
[1m[35m (1.2ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.582890"], ["updated_at", "2014-11-17 16:58:38.582890"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.585467"], ["updated_at", "2014-11-17 16:58:38.585467"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.588007"], ["updated_at", "2014-11-17 16:58:38.588007"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.590057"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.590057"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.590057')[0m [["thread_id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.594151"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.594151"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.590057')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:58:38.597737"], ["creator_id", 1], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.597737"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.590057')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:58:38.600386' WHERE "commontator_subscriptions"."id" = 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.600386') [["thread_id", 1]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.604499"], ["updated_at", "2014-11-17 16:58:38.604499"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.610564"], ["updated_at", "2014-11-17 16:58:38.610564"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.612269"], ["updated_at", "2014-11-17 16:58:38.612269"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (7.7ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.628447"], ["updated_at", "2014-11-17 16:58:38.628447"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.629859"], ["updated_at", "2014-11-17 16:58:38.629859"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.631429"], ["updated_at", "2014-11-17 16:58:38.631429"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.638491"], ["updated_at", "2014-11-17 16:58:38.638491"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.640770"], ["updated_at", "2014-11-17 16:58:38.640770"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.643141"], ["updated_at", "2014-11-17 16:58:38.643141"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.655931"], ["updated_at", "2014-11-17 16:58:38.655931"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.657180"], ["updated_at", "2014-11-17 16:58:38.657180"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.658646"], ["updated_at", "2014-11-17 16:58:38.658646"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 16:58:38.663861"], ["updated_at", "2014-11-17 16:58:38.665042"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.670887"], ["updated_at", "2014-11-17 16:58:38.670887"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.672103"], ["updated_at", "2014-11-17 16:58:38.672103"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.673514"], ["updated_at", "2014-11-17 16:58:38.673514"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:58:38.675448"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:38.676153"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:58:38.678157"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:58:38.679596"], ["updated_at", "2014-11-17 16:58:38.680340"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.682692"], ["updated_at", "2014-11-17 16:58:38.682692"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.683888"], ["updated_at", "2014-11-17 16:58:38.683888"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.685392"], ["updated_at", "2014-11-17 16:58:38.685392"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 16:58:38.686002"], ["updated_at", "2014-11-17 16:58:38.686603"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-11-17 16:58:38.692272"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.695839"], ["updated_at", "2014-11-17 16:58:38.695839"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.697021"], ["updated_at", "2014-11-17 16:58:38.697021"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.698428"], ["updated_at", "2014-11-17 16:58:38.698428"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:58:38.699000"], ["updated_at", "2014-11-17 16:58:38.699563"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:58:38.702367"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 16:58:38.703738"], ["updated_at", "2014-11-17 16:58:38.704352"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 16:58:38.707429"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.712847"], ["updated_at", "2014-11-17 16:58:38.712847"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.714826"], ["updated_at", "2014-11-17 16:58:38.714826"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.717095"], ["updated_at", "2014-11-17 16:58:38.717095"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.722761"], ["updated_at", "2014-11-17 16:58:38.722761"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.725007"], ["updated_at", "2014-11-17 16:58:38.725007"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.727324"], ["updated_at", "2014-11-17 16:58:38.727324"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.729921"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.729921"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:38.731919"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.733773"], ["updated_at", "2014-11-17 16:58:38.733773"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.735193"], ["updated_at", "2014-11-17 16:58:38.735193"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.736717"], ["updated_at", "2014-11-17 16:58:38.736717"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:38.737580') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.738549"], ["updated_at", "2014-11-17 16:58:38.738549"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.739043"], ["creator_id", 2], ["creator_type", "DummyUser"], ["deleted_at", "2014-11-17 16:58:38.737580"], ["editor_id", 3], ["editor_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.739043"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-11-17 16:58:38.740597"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.742007"], ["updated_at", "2014-11-17 16:58:38.742007"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.743138"], ["updated_at", "2014-11-17 16:58:38.743138"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.744722"], ["updated_at", "2014-11-17 16:58:38.744722"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.746310"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 16:58:38.746310"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.747906"], ["updated_at", "2014-11-17 16:58:38.747906"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["body", "Something else"], ["editor_id", 3], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:38.749806"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.752837"], ["updated_at", "2014-11-17 16:58:38.752837"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.754352"], ["updated_at", "2014-11-17 16:58:38.754352"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.756305"], ["updated_at", "2014-11-17 16:58:38.756305"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.758022"], ["updated_at", "2014-11-17 16:58:38.758022"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.759416"], ["updated_at", "2014-11-17 16:58:38.759416"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.761040"], ["updated_at", "2014-11-17 16:58:38.761040"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.762658"], ["updated_at", "2014-11-17 16:58:38.762658"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.764011"], ["updated_at", "2014-11-17 16:58:38.764011"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."id" != 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 3[0m [["closed_at", "2014-11-17 16:58:38.765294"], ["closer_id", 3], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:38.765969"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."id" != 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 3[0m [["closed_at", nil], ["updated_at", "2014-11-17 16:58:38.767818"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.769228"], ["updated_at", "2014-11-17 16:58:38.769228"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.771023"], ["updated_at", "2014-11-17 16:58:38.771023"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.772443"], ["updated_at", "2014-11-17 16:58:38.772443"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.775206"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 16:58:38.775206"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.776693"], ["updated_at", "2014-11-17 16:58:38.776693"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.779251"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 16:58:38.779251"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 4]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 4]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.782152"], ["updated_at", "2014-11-17 16:58:38.782152"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.783882"], ["updated_at", "2014-11-17 16:58:38.783882"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.785355"], ["updated_at", "2014-11-17 16:58:38.785355"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 6 AND "commontator_comments"."thread_id" = 5 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.787632"], ["creator_id", 6], ["creator_type", "DummyUser"], ["thread_id", 5], ["updated_at", "2014-11-17 16:58:38.787632"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 5[0m [["closed_at", "2014-11-17 16:58:38.788902"], ["closer_id", 6], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:38.789668"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 5]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 5], ["commontable_type", "DummyModel"]] [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 5 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-11-17 16:58:38.795538"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.797025"], ["updated_at", "2014-11-17 16:58:38.797025"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 5]] [1m[35m (0.8ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 5]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 5], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 6]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.802053"], ["updated_at", "2014-11-17 16:58:38.802053"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.804038"], ["updated_at", "2014-11-17 16:58:38.804038"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.805718"], ["updated_at", "2014-11-17 16:58:38.805718"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.808537"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 16:58:38.808537"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.808537') [["thread_id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.812862"], ["creator_id", 7], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 16:58:38.812862"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.808537') [["thread_id", 7]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 16:58:38.816578' WHERE "commontator_subscriptions"."id" = 3[0m [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 7]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 16:58:38.816578') [["thread_id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.819858"], ["updated_at", "2014-11-17 16:58:38.819858"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.821546"], ["updated_at", "2014-11-17 16:58:38.821546"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.822980"], ["updated_at", "2014-11-17 16:58:38.822980"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.825170"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-11-17 16:58:38.825170"]] [1m[36m (5.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:58:38.832639"], ["creator_id", 8], ["creator_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-11-17 16:58:38.832639"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 8]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 8]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.835429"], ["updated_at", "2014-11-17 16:58:38.835429"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.837371"], ["updated_at", "2014-11-17 16:58:38.837371"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.838865"], ["updated_at", "2014-11-17 16:58:38.838865"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.842100"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:58:38.842100"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.843686"], ["updated_at", "2014-11-17 16:58:38.843686"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 10) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.846320"], ["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["updated_at", "2014-11-17 16:58:38.846320"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 9 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 10], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.850425"], ["updated_at", "2014-11-17 16:58:38.850425"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.852159"], ["updated_at", "2014-11-17 16:58:38.852159"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.853663"], ["updated_at", "2014-11-17 16:58:38.853663"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10[0m [["commontable_id", nil], ["updated_at", "2014-11-17 16:58:38.855415"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.858591"], ["updated_at", "2014-11-17 16:58:38.858591"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.859759"], ["updated_at", "2014-11-17 16:58:38.859759"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.861104"], ["updated_at", "2014-11-17 16:58:38.861104"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.866900"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.866900"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.871177"], ["updated_at", "2014-11-17 16:58:38.871177"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.872379"], ["updated_at", "2014-11-17 16:58:38.872379"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.873838"], ["updated_at", "2014-11-17 16:58:38.873838"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.877328"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.877328"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.882302"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.882302"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.887014"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.887014"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.889910"], ["updated_at", "2014-11-17 16:58:38.889910"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.891532"], ["updated_at", "2014-11-17 16:58:38.891532"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.893311"], ["updated_at", "2014-11-17 16:58:38.893311"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:38.895300"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.895300"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.903424"], ["updated_at", "2014-11-17 16:58:38.903424"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.904651"], ["updated_at", "2014-11-17 16:58:38.904651"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.906135"], ["updated_at", "2014-11-17 16:58:38.906135"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.908070"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.908070"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.914131"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.914131"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:38.918978"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.918978"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 8]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.925259"], ["updated_at", "2014-11-17 16:58:38.925259"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.927317"], ["updated_at", "2014-11-17 16:58:38.927317"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.929666"], ["updated_at", "2014-11-17 16:58:38.929666"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.931907"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.931907"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.938381"], ["updated_at", "2014-11-17 16:58:38.938381"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.939930"], ["updated_at", "2014-11-17 16:58:38.939930"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.941558"], ["updated_at", "2014-11-17 16:58:38.941558"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.943163"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.943163"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.951223"], ["updated_at", "2014-11-17 16:58:38.951223"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.952422"], ["updated_at", "2014-11-17 16:58:38.952422"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.953852"], ["updated_at", "2014-11-17 16:58:38.953852"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:38.955413"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.955413"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 16:58:38.958186"], ["updated_at", "2014-11-17 16:58:38.958960"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.962292"], ["updated_at", "2014-11-17 16:58:38.962292"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.963500"], ["updated_at", "2014-11-17 16:58:38.963500"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.965184"], ["updated_at", "2014-11-17 16:58:38.965184"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.967140"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.967140"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:38.970462"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.970462"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Another thing"], ["created_at", "2014-11-17 16:58:38.974621"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.974621"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "And this too"], ["created_at", "2014-11-17 16:58:38.978333"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.978333"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.981277"], ["updated_at", "2014-11-17 16:58:38.981277"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:38.982584"], ["updated_at", "2014-11-17 16:58:38.982584"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:38.984001"], ["updated_at", "2014-11-17 16:58:38.984001"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:38.985574"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.985574"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:58:38.992360"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:38.992360"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:38.999588"], ["updated_at", "2014-11-17 16:58:38.999588"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.001073"], ["updated_at", "2014-11-17 16:58:39.001073"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.002712"], ["updated_at", "2014-11-17 16:58:39.002712"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.004402"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.004402"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.009201"], ["updated_at", "2014-11-17 16:58:39.009201"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 7ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.018464"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.018464"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.023083"], ["updated_at", "2014-11-17 16:58:39.023083"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.024289"], ["updated_at", "2014-11-17 16:58:39.024289"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.025742"], ["updated_at", "2014-11-17 16:58:39.025742"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.027262"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.027262"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.038628"], ["updated_at", "2014-11-17 16:58:39.038628"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.039891"], ["updated_at", "2014-11-17 16:58:39.039891"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.042004"], ["updated_at", "2014-11-17 16:58:39.042004"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.043643"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.043643"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.048929"], ["updated_at", "2014-11-17 16:58:39.048929"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.052721"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.052721"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.057377"], ["updated_at", "2014-11-17 16:58:39.057377"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.058569"], ["updated_at", "2014-11-17 16:58:39.058569"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.059997"], ["updated_at", "2014-11-17 16:58:39.059997"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.061538"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.061538"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:39.065759"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.077502"], ["updated_at", "2014-11-17 16:58:39.077502"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.078760"], ["updated_at", "2014-11-17 16:58:39.078760"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.080250"], ["updated_at", "2014-11-17 16:58:39.080250"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.082380"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.082380"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.087390') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:58:39.087390"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:39.088690"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.093784"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.093784"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 16:58:39.095171"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.099683"], ["updated_at", "2014-11-17 16:58:39.099683"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.100875"], ["updated_at", "2014-11-17 16:58:39.100875"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.102326"], ["updated_at", "2014-11-17 16:58:39.102326"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.103862"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.103862"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.107188') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:58:39.107188"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:39.108106"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.109804"], ["updated_at", "2014-11-17 16:58:39.109804"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.111221"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.111221"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 16:58:39.112794"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.114852') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:58:39.114852"], ["editor_id", 13], ["updated_at", "2014-11-17 16:58:39.116396"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 16:58:39.118661"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.120814') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:58:39.120814"], ["editor_id", 13], ["updated_at", "2014-11-17 16:58:39.121707"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.124203"], ["updated_at", "2014-11-17 16:58:39.124203"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.125493"], ["updated_at", "2014-11-17 16:58:39.125493"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.126932"], ["updated_at", "2014-11-17 16:58:39.126932"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.128481"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.128481"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.129126') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:58:39.129126"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:39.129981"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 16:58:39.136296"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.140146"], ["updated_at", "2014-11-17 16:58:39.140146"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.140717') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:58:39.140717"], ["editor_id", 13], ["updated_at", "2014-11-17 16:58:39.141625"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.145347"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.145347"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 16:58:39.147159"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.147612') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:58:39.147612"], ["updated_at", "2014-11-17 16:58:39.148377"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.153144"], ["updated_at", "2014-11-17 16:58:39.153144"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.154316"], ["updated_at", "2014-11-17 16:58:39.154316"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.155780"], ["updated_at", "2014-11-17 16:58:39.155780"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.157334"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.157334"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.157963') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:58:39.157963"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 16:58:39.158968"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 16:58:39.163678"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.165863"], ["updated_at", "2014-11-17 16:58:39.165863"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.167520"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.167520"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.168217') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 16:58:39.168217"], ["updated_at", "2014-11-17 16:58:39.169101"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-11-17 16:58:39.172270"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-11-17 16:58:39.173588') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 16:58:39.173588"], ["editor_id", 12], ["updated_at", "2014-11-17 16:58:39.174432"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-11-17 16:58:39.177284"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.183186"], ["updated_at", "2014-11-17 16:58:39.183186"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.184452"], ["updated_at", "2014-11-17 16:58:39.184452"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.185928"], ["updated_at", "2014-11-17 16:58:39.185928"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.187499"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.187499"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.196500"], ["updated_at", "2014-11-17 16:58:39.196500"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.201911"], ["updated_at", "2014-11-17 16:58:39.201911"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.203141"], ["updated_at", "2014-11-17 16:58:39.203141"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.204654"], ["updated_at", "2014-11-17 16:58:39.204654"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.206203"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.206203"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.207067"], ["updated_at", "2014-11-17 16:58:39.207067"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:39.215064"], ["updated_at", "2014-11-17 16:58:39.215064"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 10ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:58:39.228974"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:58:39.234695"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.240007"], ["updated_at", "2014-11-17 16:58:39.240007"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.241289"], ["updated_at", "2014-11-17 16:58:39.241289"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.242810"], ["updated_at", "2014-11-17 16:58:39.242810"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.244389"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.244389"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.251456"], ["updated_at", "2014-11-17 16:58:39.251456"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.256701"], ["updated_at", "2014-11-17 16:58:39.256701"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.257885"], ["updated_at", "2014-11-17 16:58:39.257885"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.259312"], ["updated_at", "2014-11-17 16:58:39.259312"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.260863"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.260863"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.261804"], ["updated_at", "2014-11-17 16:58:39.261804"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:39.265807"], ["updated_at", "2014-11-17 16:58:39.265807"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 16:58:39.278455"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 16:58:39.284719"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 7ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.290203"], ["updated_at", "2014-11-17 16:58:39.290203"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.291586"], ["updated_at", "2014-11-17 16:58:39.291586"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.293138"], ["updated_at", "2014-11-17 16:58:39.293138"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.294733"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.294733"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:39.296749"], ["updated_at", "2014-11-17 16:58:39.296749"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.305518"], ["updated_at", "2014-11-17 16:58:39.305518"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.310867"], ["updated_at", "2014-11-17 16:58:39.310867"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.312055"], ["updated_at", "2014-11-17 16:58:39.312055"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.313517"], ["updated_at", "2014-11-17 16:58:39.313517"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.315129"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.315129"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.315994"], ["updated_at", "2014-11-17 16:58:39.315994"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 16:58:39.317827"], ["updated_at", "2014-11-17 16:58:39.317827"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:39.334711"], ["updated_at", "2014-11-17 16:58:39.334711"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 13 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.351987"], ["updated_at", "2014-11-17 16:58:39.351987"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.353285"], ["updated_at", "2014-11-17 16:58:39.353285"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.354818"], ["updated_at", "2014-11-17 16:58:39.354818"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 16:58:39.356416"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.356416"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.357358"], ["updated_at", "2014-11-17 16:58:39.357358"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.360618"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.360618"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 16:58:39.363670"], ["updated_at", "2014-11-17 16:58:39.363670"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.364837"], ["updated_at", "2014-11-17 16:58:39.364837"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 16:58:39.366313"], ["updated_at", "2014-11-17 16:58:39.366313"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 16:58:39.367829"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.367829"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 16:58:39.368699"], ["updated_at", "2014-11-17 16:58:39.368699"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 16:58:39.370577"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.370577"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 16:58:39.373732"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 16:58:39.373732"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mrollback transaction[0m [1m[36m (1.6ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.7ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.526239"], ["updated_at", "2014-11-17 17:04:12.526239"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.542782"], ["updated_at", "2014-11-17 17:04:12.542782"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.550493"], ["updated_at", "2014-11-17 17:04:12.550493"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:12.565876"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.565876"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.571743"], ["updated_at", "2014-11-17 17:04:12.571743"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.573306"], ["updated_at", "2014-11-17 17:04:12.573306"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.575221"], ["updated_at", "2014-11-17 17:04:12.575221"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.579364"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.579364"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.584712"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.584712"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.589790"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.589790"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.592736"], ["updated_at", "2014-11-17 17:04:12.592736"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.594030"], ["updated_at", "2014-11-17 17:04:12.594030"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.595615"], ["updated_at", "2014-11-17 17:04:12.595615"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:12.597765"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.597765"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.606000"], ["updated_at", "2014-11-17 17:04:12.606000"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.607295"], ["updated_at", "2014-11-17 17:04:12.607295"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.608849"], ["updated_at", "2014-11-17 17:04:12.608849"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.610978"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.610978"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.617082"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.617082"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:12.621929"], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.621929"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 3]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.629580"], ["updated_at", "2014-11-17 17:04:12.629580"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.633032"], ["updated_at", "2014-11-17 17:04:12.633032"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.634614"], ["updated_at", "2014-11-17 17:04:12.634614"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.636614"], ["updated_at", "2014-11-17 17:04:12.636614"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.642654"], ["updated_at", "2014-11-17 17:04:12.642654"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.644018"], ["updated_at", "2014-11-17 17:04:12.644018"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.645618"], ["updated_at", "2014-11-17 17:04:12.645618"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.657435"], ["updated_at", "2014-11-17 17:04:12.657435"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.658737"], ["updated_at", "2014-11-17 17:04:12.658737"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.660270"], ["updated_at", "2014-11-17 17:04:12.660270"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 5ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 17:04:12.669988"], ["updated_at", "2014-11-17 17:04:12.671040"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.675762"], ["updated_at", "2014-11-17 17:04:12.675762"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.677558"], ["updated_at", "2014-11-17 17:04:12.677558"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.679649"], ["updated_at", "2014-11-17 17:04:12.679649"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 17:04:12.682224"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:12.683108"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 17:04:12.685395"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 17:04:12.687126"], ["updated_at", "2014-11-17 17:04:12.687841"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.690251"], ["updated_at", "2014-11-17 17:04:12.690251"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.691533"], ["updated_at", "2014-11-17 17:04:12.691533"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.693028"], ["updated_at", "2014-11-17 17:04:12.693028"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 17:04:12.693708"], ["updated_at", "2014-11-17 17:04:12.694345"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-11-17 17:04:12.700328"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.703870"], ["updated_at", "2014-11-17 17:04:12.703870"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.705095"], ["updated_at", "2014-11-17 17:04:12.705095"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.706505"], ["updated_at", "2014-11-17 17:04:12.706505"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 17:04:12.707078"], ["updated_at", "2014-11-17 17:04:12.707647"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 17:04:12.710443"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 17:04:12.711833"], ["updated_at", "2014-11-17 17:04:12.712456"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 17:04:12.714857"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.722595"], ["updated_at", "2014-11-17 17:04:12.722595"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.724111"], ["updated_at", "2014-11-17 17:04:12.724111"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 1]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (12.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.745771"], ["updated_at", "2014-11-17 17:04:12.745771"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.747703"], ["updated_at", "2014-11-17 17:04:12.747703"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.750069"], ["updated_at", "2014-11-17 17:04:12.750069"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:12.757401"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.757401"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.765606"], ["updated_at", "2014-11-17 17:04:12.765606"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.767465"], ["updated_at", "2014-11-17 17:04:12.767465"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.769212"], ["updated_at", "2014-11-17 17:04:12.769212"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.770926"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.770926"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.779148"], ["updated_at", "2014-11-17 17:04:12.779148"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.780545"], ["updated_at", "2014-11-17 17:04:12.780545"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.782044"], ["updated_at", "2014-11-17 17:04:12.782044"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:12.783606"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.783606"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 17:04:12.786396"], ["updated_at", "2014-11-17 17:04:12.787167"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.790537"], ["updated_at", "2014-11-17 17:04:12.790537"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.791707"], ["updated_at", "2014-11-17 17:04:12.791707"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.793129"], ["updated_at", "2014-11-17 17:04:12.793129"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.794867"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.794867"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.798383"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.798383"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Another thing"], ["created_at", "2014-11-17 17:04:12.803322"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.803322"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "And this too"], ["created_at", "2014-11-17 17:04:12.807396"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.807396"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.810481"], ["updated_at", "2014-11-17 17:04:12.810481"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.811859"], ["updated_at", "2014-11-17 17:04:12.811859"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.813482"], ["updated_at", "2014-11-17 17:04:12.813482"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.815161"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.815161"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.822292"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.822292"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.829064"], ["updated_at", "2014-11-17 17:04:12.829064"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.830471"], ["updated_at", "2014-11-17 17:04:12.830471"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.832085"], ["updated_at", "2014-11-17 17:04:12.832085"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.833685"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.833685"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.838427"], ["updated_at", "2014-11-17 17:04:12.838427"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.846209"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.846209"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.851259"], ["updated_at", "2014-11-17 17:04:12.851259"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.852521"], ["updated_at", "2014-11-17 17:04:12.852521"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.853948"], ["updated_at", "2014-11-17 17:04:12.853948"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.855530"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.855530"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.867546"], ["updated_at", "2014-11-17 17:04:12.867546"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.868796"], ["updated_at", "2014-11-17 17:04:12.868796"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.870353"], ["updated_at", "2014-11-17 17:04:12.870353"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.872137"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.872137"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.877399"], ["updated_at", "2014-11-17 17:04:12.877399"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.882024"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.882024"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.887243"], ["updated_at", "2014-11-17 17:04:12.887243"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.888588"], ["updated_at", "2014-11-17 17:04:12.888588"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.890072"], ["updated_at", "2014-11-17 17:04:12.890072"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.891696"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.891696"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:12.896687"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.908475"], ["updated_at", "2014-11-17 17:04:12.908475"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.909798"], ["updated_at", "2014-11-17 17:04:12.909798"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.911354"], ["updated_at", "2014-11-17 17:04:12.911354"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.913073"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.913073"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.919347') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 17:04:12.919347"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:12.920986"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.926255"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.926255"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["updated_at", "2014-11-17 17:04:12.927853"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.933459"], ["updated_at", "2014-11-17 17:04:12.933459"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.935365"], ["updated_at", "2014-11-17 17:04:12.935365"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.937339"], ["updated_at", "2014-11-17 17:04:12.937339"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:12.939301"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.939301"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.943162') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 17:04:12.943162"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:12.944167"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.945948"], ["updated_at", "2014-11-17 17:04:12.945948"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.947543"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.947543"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:04:12.949069"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.951063') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 17:04:12.951063"], ["editor_id", 3], ["updated_at", "2014-11-17 17:04:12.951984"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-11-17 17:04:12.954201"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.956188') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 17:04:12.956188"], ["editor_id", 3], ["updated_at", "2014-11-17 17:04:12.957106"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.959566"], ["updated_at", "2014-11-17 17:04:12.959566"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.960981"], ["updated_at", "2014-11-17 17:04:12.960981"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.962646"], ["updated_at", "2014-11-17 17:04:12.962646"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:12.964466"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.964466"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.965185') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 17:04:12.965185"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:12.966051"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:04:12.972776"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.976646"], ["updated_at", "2014-11-17 17:04:12.976646"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.977199') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 17:04:12.977199"], ["editor_id", 3], ["updated_at", "2014-11-17 17:04:12.978252"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:12.984103"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.984103"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-11-17 17:04:12.986203"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:12.986827') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 17:04:12.986827"], ["updated_at", "2014-11-17 17:04:12.987622"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:12.993564"], ["updated_at", "2014-11-17 17:04:12.993564"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:12.995185"], ["updated_at", "2014-11-17 17:04:12.995185"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:12.996940"], ["updated_at", "2014-11-17 17:04:12.996940"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:12.999405"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:12.999405"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:13.000323') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 17:04:13.000323"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:13.001426"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:04:13.007047"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.008725"], ["updated_at", "2014-11-17 17:04:13.008725"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:13.010288"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.010288"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:13.010991') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", "2014-11-17 17:04:13.010991"], ["updated_at", "2014-11-17 17:04:13.011944"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-11-17 17:04:13.015182"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:13.016456') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1[0m [["deleted_at", "2014-11-17 17:04:13.016456"], ["editor_id", 2], ["updated_at", "2014-11-17 17:04:13.017282"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 1 [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-11-17 17:04:13.020459"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.025618"], ["updated_at", "2014-11-17 17:04:13.025618"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.026892"], ["updated_at", "2014-11-17 17:04:13.026892"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.028627"], ["updated_at", "2014-11-17 17:04:13.028627"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.030368"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.030368"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.040152"], ["updated_at", "2014-11-17 17:04:13.040152"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.045880"], ["updated_at", "2014-11-17 17:04:13.045880"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.047243"], ["updated_at", "2014-11-17 17:04:13.047243"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.048943"], ["updated_at", "2014-11-17 17:04:13.048943"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.050619"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.050619"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.051497"], ["updated_at", "2014-11-17 17:04:13.051497"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.059828"], ["updated_at", "2014-11-17 17:04:13.059828"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 10ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 17:04:13.073391"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 17:04:13.079141"], ["vote_flag", "t"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.085252"], ["updated_at", "2014-11-17 17:04:13.085252"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.086600"], ["updated_at", "2014-11-17 17:04:13.086600"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.088128"], ["updated_at", "2014-11-17 17:04:13.088128"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.089734"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.089734"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.098157"], ["updated_at", "2014-11-17 17:04:13.098157"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.105359"], ["updated_at", "2014-11-17 17:04:13.105359"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.107200"], ["updated_at", "2014-11-17 17:04:13.107200"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.109496"], ["updated_at", "2014-11-17 17:04:13.109496"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.111805"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.111805"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.112952"], ["updated_at", "2014-11-17 17:04:13.112952"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.117654"], ["updated_at", "2014-11-17 17:04:13.117654"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 17:04:13.132277"], ["vote_flag", "t"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 17:04:13.140149"], ["vote_flag", "f"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.146090"], ["updated_at", "2014-11-17 17:04:13.146090"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.148046"], ["updated_at", "2014-11-17 17:04:13.148046"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.150466"], ["updated_at", "2014-11-17 17:04:13.150466"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.152828"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.152828"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 2 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.155668"], ["updated_at", "2014-11-17 17:04:13.155668"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.165355"], ["updated_at", "2014-11-17 17:04:13.165355"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.171091"], ["updated_at", "2014-11-17 17:04:13.171091"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.172357"], ["updated_at", "2014-11-17 17:04:13.172357"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.173826"], ["updated_at", "2014-11-17 17:04:13.173826"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.175367"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.175367"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.176218"], ["updated_at", "2014-11-17 17:04:13.176218"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.178383"], ["updated_at", "2014-11-17 17:04:13.178383"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.7ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.195974"], ["updated_at", "2014-11-17 17:04:13.195974"], ["votable_id", 1], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 3 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 11ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.213175"], ["updated_at", "2014-11-17 17:04:13.213175"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.214649"], ["updated_at", "2014-11-17 17:04:13.214649"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.216318"], ["updated_at", "2014-11-17 17:04:13.216318"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.217995"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.217995"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.219009"], ["updated_at", "2014-11-17 17:04:13.219009"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:13.222589"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.222589"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.225618"], ["updated_at", "2014-11-17 17:04:13.225618"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.226830"], ["updated_at", "2014-11-17 17:04:13.226830"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.228515"], ["updated_at", "2014-11-17 17:04:13.228515"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.230349"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.230349"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.231281"], ["updated_at", "2014-11-17 17:04:13.231281"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 1 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.233522"], ["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.233522"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:13.237181"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 1], ["updated_at", "2014-11-17 17:04:13.237181"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.242160"], ["updated_at", "2014-11-17 17:04:13.242160"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.244038"], ["updated_at", "2014-11-17 17:04:13.244038"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.246799"], ["updated_at", "2014-11-17 17:04:13.246799"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.2ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", "2014-11-17 17:04:13.248880"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:13.250591"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1 [["closed_at", nil], ["updated_at", "2014-11-17 17:04:13.252673"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.254124"], ["updated_at", "2014-11-17 17:04:13.254124"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.255921"], ["updated_at", "2014-11-17 17:04:13.255921"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.257377"], ["updated_at", "2014-11-17 17:04:13.257377"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.259719"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 17:04:13.259719"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:04:13.262223"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 17:04:13.262223"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.265051"], ["updated_at", "2014-11-17 17:04:13.265051"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.266842"], ["updated_at", "2014-11-17 17:04:13.266842"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.268367"], ["updated_at", "2014-11-17 17:04:13.268367"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.2ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.272496"], ["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-11-17 17:04:13.272496"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.274435"], ["updated_at", "2014-11-17 17:04:13.274435"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 3 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.277457"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["updated_at", "2014-11-17 17:04:13.277457"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 3]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 4]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.280582"], ["updated_at", "2014-11-17 17:04:13.280582"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.282339"], ["updated_at", "2014-11-17 17:04:13.282339"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.283840"], ["updated_at", "2014-11-17 17:04:13.283840"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.286807"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 17:04:13.286807"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.286807')[0m [["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 6 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.291883"], ["creator_id", 6], ["creator_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 17:04:13.291883"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.286807')[0m [["thread_id", 4]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 4 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 17:04:13.296079' WHERE "commontator_subscriptions"."id" = 3 [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.296079')[0m [["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.299700"], ["updated_at", "2014-11-17 17:04:13.299700"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.301900"], ["updated_at", "2014-11-17 17:04:13.301900"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.303497"], ["updated_at", "2014-11-17 17:04:13.303497"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 5[0m [["commontable_id", nil], ["updated_at", "2014-11-17 17:04:13.305217"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.307193"], ["updated_at", "2014-11-17 17:04:13.307193"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.309403"], ["updated_at", "2014-11-17 17:04:13.309403"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.311114"], ["updated_at", "2014-11-17 17:04:13.311114"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.2ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.314598"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 17:04:13.314598"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.316349"], ["updated_at", "2014-11-17 17:04:13.316349"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.319326"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 17:04:13.319326"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 6]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.323972"], ["updated_at", "2014-11-17 17:04:13.323972"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.325718"], ["updated_at", "2014-11-17 17:04:13.325718"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.327327"], ["updated_at", "2014-11-17 17:04:13.327327"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.329759"], ["creator_id", 10], ["creator_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 17:04:13.329759"]] [1m[35m (0.5ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7[0m [["closed_at", "2014-11-17 17:04:13.331090"], ["closer_id", 10], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:13.331970"]] [1m[35m (0.5ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 7], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 7 [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-11-17 17:04:13.336767"]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.337988"], ["updated_at", "2014-11-17 17:04:13.337988"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 7]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1[0m [["thread_id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 7], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 4 LIMIT 1 [["thread_id", 8]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.341944"], ["updated_at", "2014-11-17 17:04:13.341944"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.343788"], ["updated_at", "2014-11-17 17:04:13.343788"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.345492"], ["updated_at", "2014-11-17 17:04:13.345492"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.347744"], ["updated_at", "2014-11-17 17:04:13.347744"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.348971"], ["updated_at", "2014-11-17 17:04:13.348971"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.350441"], ["updated_at", "2014-11-17 17:04:13.350441"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.352211"], ["updated_at", "2014-11-17 17:04:13.352211"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.353358"], ["updated_at", "2014-11-17 17:04:13.353358"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.355184"], ["updated_at", "2014-11-17 17:04:13.355184"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.356997"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.356997"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:13.358576"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.360452"], ["updated_at", "2014-11-17 17:04:13.360452"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.361964"], ["updated_at", "2014-11-17 17:04:13.361964"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.363646"], ["updated_at", "2014-11-17 17:04:13.363646"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:04:13.364597') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.366039"], ["updated_at", "2014-11-17 17:04:13.366039"]] [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.366656"], ["creator_id", 12], ["creator_type", "DummyUser"], ["deleted_at", "2014-11-17 17:04:13.364597"], ["editor_id", 13], ["editor_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.366656"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:04:13.368840"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.370650"], ["updated_at", "2014-11-17 17:04:13.370650"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.372034"], ["updated_at", "2014-11-17 17:04:13.372034"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.373662"], ["updated_at", "2014-11-17 17:04:13.373662"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.375315"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.375315"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.377097"], ["updated_at", "2014-11-17 17:04:13.377097"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 13], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:04:13.378624"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.386074"], ["updated_at", "2014-11-17 17:04:13.386074"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.387380"], ["updated_at", "2014-11-17 17:04:13.387380"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.388896"], ["updated_at", "2014-11-17 17:04:13.388896"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.389741"], ["updated_at", "2014-11-17 17:04:13.389741"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:04:13.391854"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.391854"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.393806"], ["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.393806"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:04:13.395541"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.395541"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (6.7ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 18.4ms Sent mail to Undisclosed Recipients (5.0ms) Date: Mon, 17 Nov 2014 11:04:13 -0600 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <546a2a8d6641f_5ae53fffa4c2dbdc93687@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #12 posted a comment on DummyModel #9 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #9.
[1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.426068"], ["updated_at", "2014-11-17 17:04:13.426068"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:04:13.427600"], ["updated_at", "2014-11-17 17:04:13.427600"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.429372"], ["updated_at", "2014-11-17 17:04:13.429372"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:04:13.431070"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.431070"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.431070')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:04:13.433475"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.433475"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.431070')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:04:13.437097"], ["creator_id", 12], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:04:13.437097"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.431070')[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 17:04:13.439723' WHERE "commontator_subscriptions"."id" = 6[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:04:13.439723') [["thread_id", 10]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:04:13.444098"], ["updated_at", "2014-11-17 17:04:13.444098"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:04:13.446283"], ["updated_at", "2014-11-17 17:04:13.446283"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[36m (1.7ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.9ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.792545"], ["updated_at", "2014-11-17 17:06:52.792545"]] [1m[35m (1.4ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.812056"], ["updated_at", "2014-11-17 17:06:52.812056"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 1], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.819693"], ["updated_at", "2014-11-17 17:06:52.819693"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.3ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", "2014-11-17 17:06:52.821281"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:52.822963"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 1[0m [["closed_at", nil], ["updated_at", "2014-11-17 17:06:52.826498"]] [1m[35m (0.4ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.827971"], ["updated_at", "2014-11-17 17:06:52.827971"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.829946"], ["updated_at", "2014-11-17 17:06:52.829946"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.831335"], ["updated_at", "2014-11-17 17:06:52.831335"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:52.839789"], ["creator_id", 2], ["creator_type", "DummyUser"], ["thread_id", 2], ["updated_at", "2014-11-17 17:06:52.839789"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2 [["closed_at", "2014-11-17 17:06:52.841237"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:52.842044"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 2[0m [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-11-17 17:06:52.849809"]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.850964"], ["updated_at", "2014-11-17 17:06:52.850964"]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 2]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1 [["thread_id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mCommontator::Comment Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = 1 LIMIT 1[0m [["thread_id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.855634"], ["updated_at", "2014-11-17 17:06:52.855634"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.857442"], ["updated_at", "2014-11-17 17:06:52.857442"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 3], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.858999"], ["updated_at", "2014-11-17 17:06:52.858999"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:52.861367"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 17:06:52.861367"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:52.863953"], ["creator_id", 3], ["creator_type", "DummyUser"], ["thread_id", 4], ["updated_at", "2014-11-17 17:06:52.863953"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 4]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC [["thread_id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.867046"], ["updated_at", "2014-11-17 17:06:52.867046"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.868812"], ["updated_at", "2014-11-17 17:06:52.868812"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 4], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.870256"], ["updated_at", "2014-11-17 17:06:52.870256"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.871925"], ["updated_at", "2014-11-17 17:06:52.871925"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.873633"], ["updated_at", "2014-11-17 17:06:52.873633"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.875952"], ["updated_at", "2014-11-17 17:06:52.875952"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:52.884088"], ["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 17:06:52.884088"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:52.884088')[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 5 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:52.889236"], ["creator_id", 5], ["creator_type", "DummyUser"], ["thread_id", 6], ["updated_at", "2014-11-17 17:06:52.889236"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:52.884088')[0m [["thread_id", 6]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 6 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 17:06:52.893047' WHERE "commontator_subscriptions"."id" = 1 [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:52.893047')[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.896359"], ["updated_at", "2014-11-17 17:06:52.896359"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.898178"], ["updated_at", "2014-11-17 17:06:52.898178"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 6], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.899598"], ["updated_at", "2014-11-17 17:06:52.899598"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:52.902446"], ["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 17:06:52.902446"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.903936"], ["updated_at", "2014-11-17 17:06:52.903936"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 7 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:52.906418"], ["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["updated_at", "2014-11-17 17:06:52.906418"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 7]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.910888"], ["updated_at", "2014-11-17 17:06:52.910888"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.912744"], ["updated_at", "2014-11-17 17:06:52.912744"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 7]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 7], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.914179"], ["updated_at", "2014-11-17 17:06:52.914179"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 8 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:52.917171"], ["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-11-17 17:06:52.917171"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.918647"], ["updated_at", "2014-11-17 17:06:52.918647"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 8 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:52.921265"], ["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 8], ["updated_at", "2014-11-17 17:06:52.921265"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 8]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 8 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 9], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.925128"], ["updated_at", "2014-11-17 17:06:52.925128"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.927043"], ["updated_at", "2014-11-17 17:06:52.927043"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.928631"], ["updated_at", "2014-11-17 17:06:52.928631"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 9 [["commontable_id", nil], ["updated_at", "2014-11-17 17:06:52.930399"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.937515"], ["updated_at", "2014-11-17 17:06:52.937515"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.939117"], ["updated_at", "2014-11-17 17:06:52.939117"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (1.4ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.951278"], ["updated_at", "2014-11-17 17:06:52.951278"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.953269"], ["updated_at", "2014-11-17 17:06:52.953269"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:52.955116"], ["updated_at", "2014-11-17 17:06:52.955116"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.956042"], ["updated_at", "2014-11-17 17:06:52.956042"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:52.958325"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:52.958325"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (5.6ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:52.966210"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:52.966210"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:52.968006"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:52.968006"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (2.2ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 14.6ms Sent mail to Undisclosed Recipients (4.6ms) Date: Mon, 17 Nov 2014 11:06:52 -0600 From: no-reply@dummy.com to: Undisclosed Recipients Message-ID: <546a2b2cf10f6_5b0d3fbfa942dbe88422f@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #11 posted a comment on DummyModel #9 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #9.
[1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:52.996895"], ["updated_at", "2014-11-17 17:06:52.996895"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:52.999209"], ["updated_at", "2014-11-17 17:06:52.999209"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.001582"], ["updated_at", "2014-11-17 17:06:53.001582"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:53.009331"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.009331"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.014254"], ["updated_at", "2014-11-17 17:06:53.014254"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.015491"], ["updated_at", "2014-11-17 17:06:53.015491"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.017021"], ["updated_at", "2014-11-17 17:06:53.017021"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.020330"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.020330"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.025282"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.025282"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.030120"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.030120"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.033054"], ["updated_at", "2014-11-17 17:06:53.033054"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.034257"], ["updated_at", "2014-11-17 17:06:53.034257"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.035689"], ["updated_at", "2014-11-17 17:06:53.035689"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:53.037582"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.037582"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.046428"], ["updated_at", "2014-11-17 17:06:53.046428"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.047753"], ["updated_at", "2014-11-17 17:06:53.047753"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.049282"], ["updated_at", "2014-11-17 17:06:53.049282"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.051229"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.051229"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.056427"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.056427"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.061097"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.061097"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 8]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.066698"], ["updated_at", "2014-11-17 17:06:53.066698"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.068202"], ["updated_at", "2014-11-17 17:06:53.068202"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.069717"], ["updated_at", "2014-11-17 17:06:53.069717"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.071307"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.071307"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.079443"], ["updated_at", "2014-11-17 17:06:53.079443"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.080765"], ["updated_at", "2014-11-17 17:06:53.080765"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.082262"], ["updated_at", "2014-11-17 17:06:53.082262"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.084007"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.084007"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.092067"], ["updated_at", "2014-11-17 17:06:53.092067"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.093292"], ["updated_at", "2014-11-17 17:06:53.093292"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.094725"], ["updated_at", "2014-11-17 17:06:53.094725"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.096231"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.096231"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 10 [["closed_at", "2014-11-17 17:06:53.098956"], ["updated_at", "2014-11-17 17:06:53.099618"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.103173"], ["updated_at", "2014-11-17 17:06:53.103173"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.104352"], ["updated_at", "2014-11-17 17:06:53.104352"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.105748"], ["updated_at", "2014-11-17 17:06:53.105748"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.107264"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.107264"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.110377"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.110377"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Another thing"], ["created_at", "2014-11-17 17:06:53.115003"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.115003"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.6ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "And this too"], ["created_at", "2014-11-17 17:06:53.119279"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.119279"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.122503"], ["updated_at", "2014-11-17 17:06:53.122503"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.123810"], ["updated_at", "2014-11-17 17:06:53.123810"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.125855"], ["updated_at", "2014-11-17 17:06:53.125855"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.127579"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.127579"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (5.4ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 9ms (ActiveRecord: 5.6ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.140808"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.140808"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.147285"], ["updated_at", "2014-11-17 17:06:53.147285"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.148567"], ["updated_at", "2014-11-17 17:06:53.148567"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.150123"], ["updated_at", "2014-11-17 17:06:53.150123"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.151678"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.151678"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.156124"], ["updated_at", "2014-11-17 17:06:53.156124"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.160421"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.160421"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.165309"], ["updated_at", "2014-11-17 17:06:53.165309"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.166530"], ["updated_at", "2014-11-17 17:06:53.166530"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.167993"], ["updated_at", "2014-11-17 17:06:53.167993"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.169615"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.169615"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.3ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.181173"], ["updated_at", "2014-11-17 17:06:53.181173"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.182371"], ["updated_at", "2014-11-17 17:06:53.182371"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.183870"], ["updated_at", "2014-11-17 17:06:53.183870"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.185436"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.185436"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.190456"], ["updated_at", "2014-11-17 17:06:53.190456"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.194199"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.194199"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.199152"], ["updated_at", "2014-11-17 17:06:53.199152"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.201388"], ["updated_at", "2014-11-17 17:06:53.201388"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.203720"], ["updated_at", "2014-11-17 17:06:53.203720"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.206043"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.206043"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["body", "Something else"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.211897"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.223346"], ["updated_at", "2014-11-17 17:06:53.223346"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.225547"], ["updated_at", "2014-11-17 17:06:53.225547"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.227851"], ["updated_at", "2014-11-17 17:06:53.227851"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.230176"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.230176"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.235900') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 17:06:53.235900"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.237192"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.242146"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.242146"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:06:53.243561"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.247977"], ["updated_at", "2014-11-17 17:06:53.247977"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.249163"], ["updated_at", "2014-11-17 17:06:53.249163"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.250648"], ["updated_at", "2014-11-17 17:06:53.250648"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.252173"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.252173"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.255639') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 17:06:53.255639"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.256627"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.258474"], ["updated_at", "2014-11-17 17:06:53.258474"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.260648"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.260648"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 17:06:53.262131"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.264346') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 17:06:53.264346"], ["editor_id", 12], ["updated_at", "2014-11-17 17:06:53.265298"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 11], ["updated_at", "2014-11-17 17:06:53.267390"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.269340') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 17:06:53.269340"], ["editor_id", 12], ["updated_at", "2014-11-17 17:06:53.270244"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.272738"], ["updated_at", "2014-11-17 17:06:53.272738"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.273991"], ["updated_at", "2014-11-17 17:06:53.273991"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.275394"], ["updated_at", "2014-11-17 17:06:53.275394"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.276960"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.276960"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.277574') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 17:06:53.277574"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.278378"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 17:06:53.284543"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.288447"], ["updated_at", "2014-11-17 17:06:53.288447"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.289006') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 17:06:53.289006"], ["editor_id", 12], ["updated_at", "2014-11-17 17:06:53.289877"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.293716"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.293716"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 11], ["updated_at", "2014-11-17 17:06:53.295604"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.296082') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 17:06:53.296082"], ["updated_at", "2014-11-17 17:06:53.296848"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.301807"], ["updated_at", "2014-11-17 17:06:53.301807"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.302999"], ["updated_at", "2014-11-17 17:06:53.302999"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.310283"], ["updated_at", "2014-11-17 17:06:53.310283"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.312402"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.312402"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.313161') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 17:06:53.313161"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.314053"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["updated_at", "2014-11-17 17:06:53.319003"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.320633"], ["updated_at", "2014-11-17 17:06:53.320633"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.322112"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.322112"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.322719') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", "2014-11-17 17:06:53.322719"], ["updated_at", "2014-11-17 17:06:53.323507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 17:06:53.326309"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.327465') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5 [["deleted_at", "2014-11-17 17:06:53.327465"], ["editor_id", 11], ["updated_at", "2014-11-17 17:06:53.328286"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-11-17 17:06:53.331064"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.333430"], ["updated_at", "2014-11-17 17:06:53.333430"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.334720"], ["updated_at", "2014-11-17 17:06:53.334720"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.336231"], ["updated_at", "2014-11-17 17:06:53.336231"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.337806"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.337806"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.346700"], ["updated_at", "2014-11-17 17:06:53.346700"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.352127"], ["updated_at", "2014-11-17 17:06:53.352127"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.353437"], ["updated_at", "2014-11-17 17:06:53.353437"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.354929"], ["updated_at", "2014-11-17 17:06:53.354929"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.356483"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.356483"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.357363"], ["updated_at", "2014-11-17 17:06:53.357363"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.365601"], ["updated_at", "2014-11-17 17:06:53.365601"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 10ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 17:06:53.379961"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 17:06:53.385650"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.390912"], ["updated_at", "2014-11-17 17:06:53.390912"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.392213"], ["updated_at", "2014-11-17 17:06:53.392213"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.393713"], ["updated_at", "2014-11-17 17:06:53.393713"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.395291"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.395291"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.402378"], ["updated_at", "2014-11-17 17:06:53.402378"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.407644"], ["updated_at", "2014-11-17 17:06:53.407644"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.408835"], ["updated_at", "2014-11-17 17:06:53.408835"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.410284"], ["updated_at", "2014-11-17 17:06:53.410284"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.411863"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.411863"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.412733"], ["updated_at", "2014-11-17 17:06:53.412733"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:53.416842"], ["updated_at", "2014-11-17 17:06:53.416842"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1 [["updated_at", "2014-11-17 17:06:53.430332"], ["vote_flag", "t"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "updated_at" = ?, "vote_flag" = ? WHERE "votes"."id" = 1[0m [["updated_at", "2014-11-17 17:06:53.435991"], ["vote_flag", "f"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.441052"], ["updated_at", "2014-11-17 17:06:53.441052"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.442370"], ["updated_at", "2014-11-17 17:06:53.442370"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.443891"], ["updated_at", "2014-11-17 17:06:53.443891"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.445468"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.445468"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 11 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.447477"], ["updated_at", "2014-11-17 17:06:53.447477"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 11], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.456297"], ["updated_at", "2014-11-17 17:06:53.456297"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.461805"], ["updated_at", "2014-11-17 17:06:53.461805"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.463056"], ["updated_at", "2014-11-17 17:06:53.463056"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.464610"], ["updated_at", "2014-11-17 17:06:53.464610"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.466299"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.466299"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.467241"], ["updated_at", "2014-11-17 17:06:53.467241"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.474333"], ["updated_at", "2014-11-17 17:06:53.474333"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "t"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("created_at", "updated_at", "votable_id", "votable_type", "vote_flag", "vote_weight", "voter_id", "voter_type") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:53.490284"], ["updated_at", "2014-11-17 17:06:53.490284"], ["votable_id", 5], ["votable_type", "Commontator::Comment"], ["vote_flag", "f"], ["vote_weight", 1], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = 5 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 11]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser'[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = 12 AND "votes"."vote_scope" IS NULL AND "votes"."voter_type" = 'DummyUser' [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = 5[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.501947"], ["updated_at", "2014-11-17 17:06:53.501947"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.503318"], ["updated_at", "2014-11-17 17:06:53.503318"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.504878"], ["updated_at", "2014-11-17 17:06:53.504878"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.506474"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.506474"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.507379"], ["updated_at", "2014-11-17 17:06:53.507379"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.510585"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.510585"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.513673"], ["updated_at", "2014-11-17 17:06:53.513673"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.514875"], ["updated_at", "2014-11-17 17:06:53.514875"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.516341"], ["updated_at", "2014-11-17 17:06:53.516341"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.517884"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.517884"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.518744"], ["updated_at", "2014-11-17 17:06:53.518744"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 10 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-17 17:06:53.520705"], ["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.520705"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"10", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.523968"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.523968"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.4ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.527856"], ["updated_at", "2014-11-17 17:06:53.527856"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.529100"], ["updated_at", "2014-11-17 17:06:53.529100"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.530588"], ["updated_at", "2014-11-17 17:06:53.530588"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.532336"], ["updated_at", "2014-11-17 17:06:53.532336"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.533457"], ["updated_at", "2014-11-17 17:06:53.533457"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.534807"], ["updated_at", "2014-11-17 17:06:53.534807"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.536555"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.536555"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 11], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.538025"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.539537"], ["updated_at", "2014-11-17 17:06:53.539537"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.540727"], ["updated_at", "2014-11-17 17:06:53.540727"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.542819"], ["updated_at", "2014-11-17 17:06:53.542819"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-11-17 17:06:53.543781') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.544784"], ["updated_at", "2014-11-17 17:06:53.544784"]] [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "deleted_at", "editor_id", "editor_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.545314"], ["creator_id", 11], ["creator_type", "DummyUser"], ["deleted_at", "2014-11-17 17:06:53.543781"], ["editor_id", 12], ["editor_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.545314"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["deleted_at", nil], ["updated_at", "2014-11-17 17:06:53.546865"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.548340"], ["updated_at", "2014-11-17 17:06:53.548340"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.549511"], ["updated_at", "2014-11-17 17:06:53.549511"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.551010"], ["updated_at", "2014-11-17 17:06:53.551010"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["body", "Something"], ["created_at", "2014-11-17 17:06:53.552556"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 10], ["updated_at", "2014-11-17 17:06:53.552556"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.554159"], ["updated_at", "2014-11-17 17:06:53.554159"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = 5[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.555468"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.559730"], ["updated_at", "2014-11-17 17:06:53.559730"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.561220"], ["updated_at", "2014-11-17 17:06:53.561220"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.565226"], ["updated_at", "2014-11-17 17:06:53.565226"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.566386"], ["updated_at", "2014-11-17 17:06:53.566386"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.567848"], ["updated_at", "2014-11-17 17:06:53.567848"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.573491"], ["updated_at", "2014-11-17 17:06:53.573491"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.575789"], ["updated_at", "2014-11-17 17:06:53.575789"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.578219"], ["updated_at", "2014-11-17 17:06:53.578219"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 10], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = 11 ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 11], ["subscriber_type", "DummyUser"]] Redirected to http://test.host/dummy_models/10 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.591416"], ["updated_at", "2014-11-17 17:06:53.591416"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.593676"], ["updated_at", "2014-11-17 17:06:53.593676"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.596028"], ["updated_at", "2014-11-17 17:06:53.596028"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 17:06:53.602227"], ["updated_at", "2014-11-17 17:06:53.602990"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.606781"], ["updated_at", "2014-11-17 17:06:53.606781"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.608109"], ["updated_at", "2014-11-17 17:06:53.608109"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.610317"], ["updated_at", "2014-11-17 17:06:53.610317"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 17:06:53.612500"], ["closer_id", 11], ["closer_type", "DummyUser"], ["updated_at", "2014-11-17 17:06:53.613243"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", nil], ["updated_at", "2014-11-17 17:06:53.615422"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 17:06:53.617016"], ["updated_at", "2014-11-17 17:06:53.617703"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.620164"], ["updated_at", "2014-11-17 17:06:53.620164"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.621384"], ["updated_at", "2014-11-17 17:06:53.621384"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.622840"], ["updated_at", "2014-11-17 17:06:53.622840"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", "2014-11-17 17:06:53.623410"], ["updated_at", "2014-11-17 17:06:53.623984"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11 [["closed_at", nil], ["updated_at", "2014-11-17 17:06:53.629523"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.633112"], ["updated_at", "2014-11-17 17:06:53.633112"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.634351"], ["updated_at", "2014-11-17 17:06:53.634351"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.635840"], ["updated_at", "2014-11-17 17:06:53.635840"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 17:06:53.636445"], ["updated_at", "2014-11-17 17:06:53.637034"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", nil], ["updated_at", "2014-11-17 17:06:53.639631"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", "2014-11-17 17:06:53.640951"], ["updated_at", "2014-11-17 17:06:53.641560"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = 11[0m [["closed_at", nil], ["updated_at", "2014-11-17 17:06:53.643825"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 8ms (ActiveRecord: 0.3ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.652025"], ["updated_at", "2014-11-17 17:06:53.652025"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-11-17 17:06:53.653418"], ["updated_at", "2014-11-17 17:06:53.653418"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 10], ["commontable_type", "DummyModel"], ["created_at", "2014-11-17 17:06:53.655107"], ["updated_at", "2014-11-17 17:06:53.655107"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 11) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("created_at", "subscriber_id", "subscriber_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-17 17:06:53.656577"], ["subscriber_id", 11], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 17:06:53.656577"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:53.656577') [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something"], ["created_at", "2014-11-17 17:06:53.659514"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 17:06:53.659514"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:53.656577') [["thread_id", 11]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 11 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("body", "created_at", "creator_id", "creator_type", "thread_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["body", "Something else"], ["created_at", "2014-11-17 17:06:53.662997"], ["creator_id", 11], ["creator_type", "DummyUser"], ["thread_id", 11], ["updated_at", "2014-11-17 17:06:53.662997"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:53.656577') [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-11-17 17:06:53.665451' WHERE "commontator_subscriptions"."id" = 6 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-11-17 17:06:53.665451')[0m [["thread_id", 11]] [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-11-17 17:06:53.670123"], ["updated_at", "2014-11-17 17:06:53.670123"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[36m (1.0ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar, "creator_id" integer, "editor_type" varchar, "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.5ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.5ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.5ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.5ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.5ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.5ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (4.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.9ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar, "commontable_id" integer, "closed_at" datetime, "closer_type" varchar, "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.7ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.7ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar, "voter_id" integer, "voter_type" varchar, "vote_flag" boolean, "vote_scope" varchar, "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.590098"], ["updated_at", "2014-12-23 15:22:18.590098"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.607177"], ["updated_at", "2014-12-23 15:22:18.607177"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.616930"], ["updated_at", "2014-12-23 15:22:18.616930"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.627806"], ["updated_at", "2014-12-23 15:22:18.627806"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.629472"], ["updated_at", "2014-12-23 15:22:18.629472"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.631163"], ["updated_at", "2014-12-23 15:22:18.631163"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 10ms (ActiveRecord: 0.4ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.654392"], ["updated_at", "2014-12-23 15:22:18.654392"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.657273"], ["updated_at", "2014-12-23 15:22:18.657273"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.660038"], ["updated_at", "2014-12-23 15:22:18.660038"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:22:18.666486"], ["updated_at", "2014-12-23 15:22:18.667975"], ["id", 1]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.676895"], ["updated_at", "2014-12-23 15:22:18.676895"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.679816"], ["updated_at", "2014-12-23 15:22:18.679816"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.682515"], ["updated_at", "2014-12-23 15:22:18.682515"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:22:18.686121"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:18.687584"], ["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:22:18.692364"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:22:18.694364"], ["updated_at", "2014-12-23 15:22:18.695484"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.701325"], ["updated_at", "2014-12-23 15:22:18.701325"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.703623"], ["updated_at", "2014-12-23 15:22:18.703623"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.705546"], ["updated_at", "2014-12-23 15:22:18.705546"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:22:18.706482"], ["updated_at", "2014-12-23 15:22:18.707303"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:22:18.722159"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.728713"], ["updated_at", "2014-12-23 15:22:18.728713"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.730581"], ["updated_at", "2014-12-23 15:22:18.730581"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.732487"], ["updated_at", "2014-12-23 15:22:18.732487"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:22:18.733405"], ["updated_at", "2014-12-23 15:22:18.734156"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:22:18.738541"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:22:18.744162"], ["updated_at", "2014-12-23 15:22:18.745489"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:22:18.748631"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.753581"], ["updated_at", "2014-12-23 15:22:18.753581"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.755275"], ["updated_at", "2014-12-23 15:22:18.755275"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.757029"], ["updated_at", "2014-12-23 15:22:18.757029"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.766972"], ["updated_at", "2014-12-23 15:22:18.766972"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.775028"], ["updated_at", "2014-12-23 15:22:18.775028"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.778222"], ["updated_at", "2014-12-23 15:22:18.778222"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.781297"], ["updated_at", "2014-12-23 15:22:18.781297"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.787889"], ["updated_at", "2014-12-23 15:22:18.787889"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.796000"], ["updated_at", "2014-12-23 15:22:18.796000"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.803678"], ["updated_at", "2014-12-23 15:22:18.803678"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.810218"], ["updated_at", "2014-12-23 15:22:18.810218"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.813287"], ["updated_at", "2014-12-23 15:22:18.813287"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.816314"], ["updated_at", "2014-12-23 15:22:18.816314"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.821027"], ["updated_at", "2014-12-23 15:22:18.821027"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.832769"], ["updated_at", "2014-12-23 15:22:18.832769"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.834484"], ["updated_at", "2014-12-23 15:22:18.834484"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.836412"], ["updated_at", "2014-12-23 15:22:18.836412"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.839154"], ["updated_at", "2014-12-23 15:22:18.839154"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.848575"], ["updated_at", "2014-12-23 15:22:18.848575"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:18.856361"], ["updated_at", "2014-12-23 15:22:18.856361"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 3]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.869212"], ["updated_at", "2014-12-23 15:22:18.869212"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.872926"], ["updated_at", "2014-12-23 15:22:18.872926"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.875473"], ["updated_at", "2014-12-23 15:22:18.875473"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:18.884508"], ["updated_at", "2014-12-23 15:22:18.884508"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.894447"], ["updated_at", "2014-12-23 15:22:18.894447"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.896907"], ["updated_at", "2014-12-23 15:22:18.896907"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.899145"], ["updated_at", "2014-12-23 15:22:18.899145"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:18.902339"], ["updated_at", "2014-12-23 15:22:18.902339"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.920969"], ["updated_at", "2014-12-23 15:22:18.920969"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.923999"], ["updated_at", "2014-12-23 15:22:18.923999"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.926917"], ["updated_at", "2014-12-23 15:22:18.926917"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:18.930253"], ["updated_at", "2014-12-23 15:22:18.930253"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:22:18.934403"], ["updated_at", "2014-12-23 15:22:18.935299"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.939676"], ["updated_at", "2014-12-23 15:22:18.939676"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.941900"], ["updated_at", "2014-12-23 15:22:18.941900"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.944795"], ["updated_at", "2014-12-23 15:22:18.944795"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:18.948207"], ["updated_at", "2014-12-23 15:22:18.948207"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:18.954311"], ["updated_at", "2014-12-23 15:22:18.954311"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 14ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Another thing"], ["created_at", "2014-12-23 15:22:18.968701"], ["updated_at", "2014-12-23 15:22:18.968701"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "And this too"], ["created_at", "2014-12-23 15:22:18.975178"], ["updated_at", "2014-12-23 15:22:18.975178"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:18.982694"], ["updated_at", "2014-12-23 15:22:18.982694"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:18.985632"], ["updated_at", "2014-12-23 15:22:18.985632"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:18.989285"], ["updated_at", "2014-12-23 15:22:18.989285"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:18.992337"], ["updated_at", "2014-12-23 15:22:18.992337"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.003323"], ["updated_at", "2014-12-23 15:22:19.003323"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.014576"], ["updated_at", "2014-12-23 15:22:19.014576"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.016552"], ["updated_at", "2014-12-23 15:22:19.016552"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.018922"], ["updated_at", "2014-12-23 15:22:19.018922"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.021514"], ["updated_at", "2014-12-23 15:22:19.021514"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.3ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.030113"], ["updated_at", "2014-12-23 15:22:19.030113"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.034390"], ["updated_at", "2014-12-23 15:22:19.034390"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.039562"], ["updated_at", "2014-12-23 15:22:19.039562"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.041128"], ["updated_at", "2014-12-23 15:22:19.041128"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.043231"], ["updated_at", "2014-12-23 15:22:19.043231"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.045687"], ["updated_at", "2014-12-23 15:22:19.045687"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.067187"], ["updated_at", "2014-12-23 15:22:19.067187"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.071012"], ["updated_at", "2014-12-23 15:22:19.071012"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.074299"], ["updated_at", "2014-12-23 15:22:19.074299"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.077388"], ["updated_at", "2014-12-23 15:22:19.077388"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.083684"], ["updated_at", "2014-12-23 15:22:19.083684"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.088649"], ["updated_at", "2014-12-23 15:22:19.088649"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.096159"], ["updated_at", "2014-12-23 15:22:19.096159"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.098677"], ["updated_at", "2014-12-23 15:22:19.098677"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.101316"], ["updated_at", "2014-12-23 15:22:19.101316"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.104686"], ["updated_at", "2014-12-23 15:22:19.104686"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.112076"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.131949"], ["updated_at", "2014-12-23 15:22:19.131949"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.135002"], ["updated_at", "2014-12-23 15:22:19.135002"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.137796"], ["updated_at", "2014-12-23 15:22:19.137796"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.141021"], ["updated_at", "2014-12-23 15:22:19.141021"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.147164') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:22:19.147164"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.148987"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.158358"], ["updated_at", "2014-12-23 15:22:19.158358"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:22:19.160551"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.167793"], ["updated_at", "2014-12-23 15:22:19.167793"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.170540"], ["updated_at", "2014-12-23 15:22:19.170540"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.173218"], ["updated_at", "2014-12-23 15:22:19.173218"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.176382"], ["updated_at", "2014-12-23 15:22:19.176382"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.181718') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:22:19.181718"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.183307"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.188735"], ["updated_at", "2014-12-23 15:22:19.188735"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.191425"], ["updated_at", "2014-12-23 15:22:19.191425"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:22:19.221472"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.224199') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:22:19.224199"], ["editor_id", 2], ["updated_at", "2014-12-23 15:22:19.225918"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-12-23 15:22:19.230712"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.232959') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:22:19.232959"], ["editor_id", 2], ["updated_at", "2014-12-23 15:22:19.234370"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.241092"], ["updated_at", "2014-12-23 15:22:19.241092"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.244037"], ["updated_at", "2014-12-23 15:22:19.244037"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.246813"], ["updated_at", "2014-12-23 15:22:19.246813"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.249886"], ["updated_at", "2014-12-23 15:22:19.249886"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.251056') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:22:19.251056"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.252519"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:22:19.260483"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.267990"], ["updated_at", "2014-12-23 15:22:19.267990"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.268836') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:22:19.268836"], ["editor_id", 2], ["updated_at", "2014-12-23 15:22:19.270134"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.274771"], ["updated_at", "2014-12-23 15:22:19.274771"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-12-23 15:22:19.278213"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.279058') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:22:19.279058"], ["updated_at", "2014-12-23 15:22:19.280262"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.3ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.288630"], ["updated_at", "2014-12-23 15:22:19.288630"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.291561"], ["updated_at", "2014-12-23 15:22:19.291561"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.294250"], ["updated_at", "2014-12-23 15:22:19.294250"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.297371"], ["updated_at", "2014-12-23 15:22:19.297371"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.298495') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:22:19.298495"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.299860"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:22:19.305952"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.311209"], ["updated_at", "2014-12-23 15:22:19.311209"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.313374"], ["updated_at", "2014-12-23 15:22:19.313374"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.314337') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:22:19.314337"], ["updated_at", "2014-12-23 15:22:19.315471"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:22:19.319172"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.324045') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:22:19.324045"], ["editor_id", 1], ["updated_at", "2014-12-23 15:22:19.325894"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:22:19.330253"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36m (0.7ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.337387"], ["updated_at", "2014-12-23 15:22:19.337387"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.339688"], ["updated_at", "2014-12-23 15:22:19.339688"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.341588"], ["updated_at", "2014-12-23 15:22:19.341588"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.343902"], ["updated_at", "2014-12-23 15:22:19.343902"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.353848"], ["updated_at", "2014-12-23 15:22:19.353848"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.361346"], ["updated_at", "2014-12-23 15:22:19.361346"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.364080"], ["updated_at", "2014-12-23 15:22:19.364080"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.367149"], ["updated_at", "2014-12-23 15:22:19.367149"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.370353"], ["updated_at", "2014-12-23 15:22:19.370353"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.371950"], ["updated_at", "2014-12-23 15:22:19.371950"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:22:19.382747"], ["updated_at", "2014-12-23 15:22:19.382747"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 14ms (ActiveRecord: 0.7ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "f"], ["updated_at", "2014-12-23 15:22:19.401824"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "t"], ["updated_at", "2014-12-23 15:22:19.409002"], ["id", 1]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 9ms (ActiveRecord: 0.6ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.419361"], ["updated_at", "2014-12-23 15:22:19.419361"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.423254"], ["updated_at", "2014-12-23 15:22:19.423254"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.426069"], ["updated_at", "2014-12-23 15:22:19.426069"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.429249"], ["updated_at", "2014-12-23 15:22:19.429249"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.437902"], ["updated_at", "2014-12-23 15:22:19.437902"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.445739"], ["updated_at", "2014-12-23 15:22:19.445739"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.448701"], ["updated_at", "2014-12-23 15:22:19.448701"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.451630"], ["updated_at", "2014-12-23 15:22:19.451630"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.455454"], ["updated_at", "2014-12-23 15:22:19.455454"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.457639"], ["updated_at", "2014-12-23 15:22:19.457639"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:22:19.464782"], ["updated_at", "2014-12-23 15:22:19.464782"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 9ms (ActiveRecord: 0.6ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "t"], ["updated_at", "2014-12-23 15:22:19.490179"], ["id", 1]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "f"], ["updated_at", "2014-12-23 15:22:19.497329"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.507736"], ["updated_at", "2014-12-23 15:22:19.507736"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.510674"], ["updated_at", "2014-12-23 15:22:19.510674"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.513389"], ["updated_at", "2014-12-23 15:22:19.513389"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.516545"], ["updated_at", "2014-12-23 15:22:19.516545"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 1], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 1], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:22:19.519724"], ["updated_at", "2014-12-23 15:22:19.519724"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.529478"], ["updated_at", "2014-12-23 15:22:19.529478"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.535781"], ["updated_at", "2014-12-23 15:22:19.535781"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.537484"], ["updated_at", "2014-12-23 15:22:19.537484"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.539279"], ["updated_at", "2014-12-23 15:22:19.539279"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.541918"], ["updated_at", "2014-12-23 15:22:19.541918"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.543281"], ["updated_at", "2014-12-23 15:22:19.543281"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:22:19.546119"], ["updated_at", "2014-12-23 15:22:19.546119"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:22:19.568633"], ["updated_at", "2014-12-23 15:22:19.568633"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.583845"], ["updated_at", "2014-12-23 15:22:19.583845"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.586890"], ["updated_at", "2014-12-23 15:22:19.586890"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.589758"], ["updated_at", "2014-12-23 15:22:19.589758"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.594106"], ["updated_at", "2014-12-23 15:22:19.594106"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.595613"], ["updated_at", "2014-12-23 15:22:19.595613"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.600213"], ["updated_at", "2014-12-23 15:22:19.600213"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.606507"], ["updated_at", "2014-12-23 15:22:19.606507"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.609247"], ["updated_at", "2014-12-23 15:22:19.609247"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.611994"], ["updated_at", "2014-12-23 15:22:19.611994"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.615103"], ["updated_at", "2014-12-23 15:22:19.615103"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.616511"], ["updated_at", "2014-12-23 15:22:19.616511"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:19.619254"], ["updated_at", "2014-12-23 15:22:19.619254"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.623798"], ["updated_at", "2014-12-23 15:22:19.623798"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.631556"], ["updated_at", "2014-12-23 15:22:19.631556"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.634469"], ["updated_at", "2014-12-23 15:22:19.634469"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.637272"], ["updated_at", "2014-12-23 15:22:19.637272"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.640662"], ["updated_at", "2014-12-23 15:22:19.640662"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.643158"], ["updated_at", "2014-12-23 15:22:19.643158"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.645296"], ["updated_at", "2014-12-23 15:22:19.645296"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.647753"], ["updated_at", "2014-12-23 15:22:19.647753"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.649894"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.652996"], ["updated_at", "2014-12-23 15:22:19.652996"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.655726"], ["updated_at", "2014-12-23 15:22:19.655726"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.658288"], ["updated_at", "2014-12-23 15:22:19.658288"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:22:19.660242') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.661977"], ["updated_at", "2014-12-23 15:22:19.661977"]] [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "deleted_at", "editor_type", "editor_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["deleted_at", "2014-12-23 15:22:19.660242"], ["editor_type", "DummyUser"], ["editor_id", 2], ["created_at", "2014-12-23 15:22:19.662938"], ["updated_at", "2014-12-23 15:22:19.662938"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:22:19.665566"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.667853"], ["updated_at", "2014-12-23 15:22:19.667853"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.669502"], ["updated_at", "2014-12-23 15:22:19.669502"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.671215"], ["updated_at", "2014-12-23 15:22:19.671215"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.673695"], ["updated_at", "2014-12-23 15:22:19.673695"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.675576"], ["updated_at", "2014-12-23 15:22:19.675576"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:19.677604"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.840148"], ["updated_at", "2014-12-23 15:22:19.840148"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.842198"], ["updated_at", "2014-12-23 15:22:19.842198"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.844076"], ["updated_at", "2014-12-23 15:22:19.844076"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.845144"], ["updated_at", "2014-12-23 15:22:19.845144"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:19.847600"], ["updated_at", "2014-12-23 15:22:19.847600"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:22:19.849858"], ["updated_at", "2014-12-23 15:22:19.849858"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.852043"], ["updated_at", "2014-12-23 15:22:19.852043"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (10.6ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (13.9ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 25.0ms Sent mail to Undisclosed Recipients (14.0ms) Date: Tue, 23 Dec 2014 09:22:19 -0600 From: no-reply@dummy.com To: Undisclosed Recipients Message-ID: <549988abd8870_41c3fd630c65bc4538eb@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #1 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #1.
[1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.906265"], ["updated_at", "2014-12-23 15:22:19.906265"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.908894"], ["updated_at", "2014-12-23 15:22:19.908894"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.911333"], ["updated_at", "2014-12-23 15:22:19.911333"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("thread_id", "subscriber_id", "subscriber_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["thread_id", 1], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["created_at", "2014-12-23 15:22:19.913751"], ["updated_at", "2014-12-23 15:22:19.913751"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:19.913751')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:19.917324"], ["updated_at", "2014-12-23 15:22:19.917324"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:19.913751')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:19.922624"], ["updated_at", "2014-12-23 15:22:19.922624"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:19.913751')[0m [["thread_id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:22:19.926937' WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:19.926937') [["thread_id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.932008"], ["updated_at", "2014-12-23 15:22:19.932008"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:22:19.933791"], ["updated_at", "2014-12-23 15:22:19.933791"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.939104"], ["updated_at", "2014-12-23 15:22:19.939104"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:22:19.940972"], ["updated_at", "2014-12-23 15:22:19.940972"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (13.7ms) [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.961962"], ["updated_at", "2014-12-23 15:22:19.961962"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.967333"], ["updated_at", "2014-12-23 15:22:19.967333"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.970337"], ["updated_at", "2014-12-23 15:22:19.970337"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:22:19.972574"], ["updated_at", "2014-12-23 15:22:19.972574"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:22:19.977347"], ["updated_at", "2014-12-23 15:22:19.977347"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.979601"], ["updated_at", "2014-12-23 15:22:19.979601"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:22:19.983537"], ["updated_at", "2014-12-23 15:22:19.983537"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.988356"], ["updated_at", "2014-12-23 15:22:19.988356"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:19.990570"], ["updated_at", "2014-12-23 15:22:19.990570"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 3], ["created_at", "2014-12-23 15:22:19.992277"], ["updated_at", "2014-12-23 15:22:19.992277"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["created_at", "2014-12-23 15:22:19.995790"], ["updated_at", "2014-12-23 15:22:19.995790"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:19.997430"], ["updated_at", "2014-12-23 15:22:19.997430"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["created_at", "2014-12-23 15:22:20.000695"], ["updated_at", "2014-12-23 15:22:20.000695"]] [1m[35m (0.8ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyUser Load (0.2ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.006223"], ["updated_at", "2014-12-23 15:22:20.006223"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.008615"], ["updated_at", "2014-12-23 15:22:20.008615"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 4], ["created_at", "2014-12-23 15:22:20.010249"], ["updated_at", "2014-12-23 15:22:20.010249"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", nil]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["commontable_id", nil], ["updated_at", "2014-12-23 15:22:20.012317"], ["id", 4]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.014301"], ["updated_at", "2014-12-23 15:22:20.014301"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.016353"], ["updated_at", "2014-12-23 15:22:20.016353"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 5], ["created_at", "2014-12-23 15:22:20.017862"], ["updated_at", "2014-12-23 15:22:20.017862"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 5 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 5], ["creator_id", 7], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:20.020917"], ["updated_at", "2014-12-23 15:22:20.020917"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 5 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 5], ["creator_id", 7], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:22:20.023979"], ["updated_at", "2014-12-23 15:22:20.023979"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 5]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 5]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.027418"], ["updated_at", "2014-12-23 15:22:20.027418"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.029638"], ["updated_at", "2014-12-23 15:22:20.029638"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 6], ["created_at", "2014-12-23 15:22:20.031329"], ["updated_at", "2014-12-23 15:22:20.031329"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 8) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["created_at", "2014-12-23 15:22:20.034786"], ["updated_at", "2014-12-23 15:22:20.034786"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:20.034786')[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 8 AND "commontator_comments"."thread_id" = 6 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 6], ["creator_id", 8], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:20.039757"], ["updated_at", "2014-12-23 15:22:20.039757"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:20.034786')[0m [["thread_id", 6]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 8], ["subscriber_type", "DummyUser"], ["thread_id", 6]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:22:20.043737' WHERE "commontator_subscriptions"."id" = ? [["id", 5]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:22:20.043737')[0m [["thread_id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.046966"], ["updated_at", "2014-12-23 15:22:20.046966"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.049161"], ["updated_at", "2014-12-23 15:22:20.049161"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 7], ["created_at", "2014-12-23 15:22:20.050919"], ["updated_at", "2014-12-23 15:22:20.050919"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.052800"], ["updated_at", "2014-12-23 15:22:20.052800"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.055371"], ["updated_at", "2014-12-23 15:22:20.055371"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 8], ["created_at", "2014-12-23 15:22:20.057302"], ["updated_at", "2014-12-23 15:22:20.057302"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 8], ["creator_id", 10], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:22:20.060539"], ["updated_at", "2014-12-23 15:22:20.060539"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."id" != 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:22:20.062199"], ["closer_id", 10], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:20.063330"], ["id", 8]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ? [["thread_id", 8], ["id", 4]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 8], ["commontable_type", "DummyModel"]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 8]] [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-12-23 15:22:20.068531"], ["id", 8]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_id", 8], ["commontable_type", "DummyModel"], ["created_at", "2014-12-23 15:22:20.069949"], ["updated_at", "2014-12-23 15:22:20.069949"]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 8]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ? [["thread_id", 8], ["id", 4]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 8], ["commontable_type", "DummyModel"]] [1m[36mCommontator::Comment Exists (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 9], ["id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:22:20.073890"], ["updated_at", "2014-12-23 15:22:20.073890"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:20.076101"], ["updated_at", "2014-12-23 15:22:20.076101"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:22:20.077702"], ["updated_at", "2014-12-23 15:22:20.077702"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:22:20.079256"], ["closer_id", 11], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:22:20.080247"], ["id", 10]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.2ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:22:20.083149"], ["id", 10]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (1.8ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar, "creator_id" integer, "editor_type" varchar, "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (1.0ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar, "commontable_id" integer, "closed_at" datetime, "closer_type" varchar, "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.8ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar, "voter_id" integer, "voter_type" varchar, "vote_flag" boolean, "vote_scope" varchar, "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m [1m[35m (0.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:22:59.983728"], ["updated_at", "2014-12-23 15:22:59.983728"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.000499"], ["updated_at", "2014-12-23 15:23:00.000499"]] [1m[35mDummyModel Load (0.2ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.013794"], ["updated_at", "2014-12-23 15:23:00.013794"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.024404"], ["updated_at", "2014-12-23 15:23:00.024404"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.027303"], ["updated_at", "2014-12-23 15:23:00.027303"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.030110"], ["updated_at", "2014-12-23 15:23:00.030110"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 10ms (ActiveRecord: 0.4ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 1], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/dummy_models/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.058226"], ["updated_at", "2014-12-23 15:23:00.058226"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.061091"], ["updated_at", "2014-12-23 15:23:00.061091"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.063785"], ["updated_at", "2014-12-23 15:23:00.063785"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:23:00.069983"], ["updated_at", "2014-12-23 15:23:00.071326"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.079013"], ["updated_at", "2014-12-23 15:23:00.079013"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.082074"], ["updated_at", "2014-12-23 15:23:00.082074"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.084978"], ["updated_at", "2014-12-23 15:23:00.084978"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.088603"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.090081"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:23:00.096011"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.098696"], ["updated_at", "2014-12-23 15:23:00.100040"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.106225"], ["updated_at", "2014-12-23 15:23:00.106225"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.109162"], ["updated_at", "2014-12-23 15:23:00.109162"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.111825"], ["updated_at", "2014-12-23 15:23:00.111825"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:23:00.113059"], ["updated_at", "2014-12-23 15:23:00.114192"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:23:00.121610"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 10ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.137078"], ["updated_at", "2014-12-23 15:23:00.137078"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.139765"], ["updated_at", "2014-12-23 15:23:00.139765"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.142233"], ["updated_at", "2014-12-23 15:23:00.142233"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.143329"], ["updated_at", "2014-12-23 15:23:00.144241"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:23:00.148884"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.154783"], ["updated_at", "2014-12-23 15:23:00.156132"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:23:00.159767"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.301616"], ["updated_at", "2014-12-23 15:23:00.301616"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.303645"], ["updated_at", "2014-12-23 15:23:00.303645"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.305480"], ["updated_at", "2014-12-23 15:23:00.305480"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.306683"], ["updated_at", "2014-12-23 15:23:00.306683"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:23:00.312062"], ["updated_at", "2014-12-23 15:23:00.312062"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:23:00.314511"], ["updated_at", "2014-12-23 15:23:00.314511"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.326003"], ["updated_at", "2014-12-23 15:23:00.326003"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (1.1ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (4.3ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 23.2ms Sent mail to Undisclosed Recipients (2.6ms) Date: Tue, 23 Dec 2014 09:23:00 -0600 From: no-reply@dummy.com To: Undisclosed Recipients Message-ID: <549988d457062_4463fdfedc65bbc8377d@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #1 posted a comment on DummyModel #1 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #1.
[1m[35m (1.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.369034"], ["updated_at", "2014-12-23 15:23:00.369034"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.371143"], ["updated_at", "2014-12-23 15:23:00.371143"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.373231"], ["updated_at", "2014-12-23 15:23:00.373231"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("thread_id", "subscriber_id", "subscriber_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["thread_id", 1], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["created_at", "2014-12-23 15:23:00.375486"], ["updated_at", "2014-12-23 15:23:00.375486"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.375486')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.379632"], ["updated_at", "2014-12-23 15:23:00.379632"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.375486')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.384471"], ["updated_at", "2014-12-23 15:23:00.384471"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.375486')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:23:00.387187' WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.387187') [["thread_id", 1]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.392306"], ["updated_at", "2014-12-23 15:23:00.392306"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.395892"], ["updated_at", "2014-12-23 15:23:00.395892"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:23:00.398437"], ["updated_at", "2014-12-23 15:23:00.398437"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:23:00.402878"], ["updated_at", "2014-12-23 15:23:00.402878"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.404644"], ["updated_at", "2014-12-23 15:23:00.404644"]] [1m[35m (1.0ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:23:00.408336"], ["updated_at", "2014-12-23 15:23:00.408336"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.412992"], ["updated_at", "2014-12-23 15:23:00.412992"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.415186"], ["updated_at", "2014-12-23 15:23:00.415186"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:23:00.417204"], ["updated_at", "2014-12-23 15:23:00.417204"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 3 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 3], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.421091"], ["updated_at", "2014-12-23 15:23:00.421091"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.422719"], ["closer_id", 3], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.423802"], ["id", 2]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 2], ["id", 1]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [0m [["id", 2]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-12-23 15:23:00.429376"], ["id", 2]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 2], ["commontable_type", "DummyModel"], ["created_at", "2014-12-23 15:23:00.430810"], ["updated_at", "2014-12-23 15:23:00.430810"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 2], ["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ? [["thread_id", 3], ["id", 1]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.435179"], ["updated_at", "2014-12-23 15:23:00.435179"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.438659"], ["updated_at", "2014-12-23 15:23:00.438659"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 3], ["created_at", "2014-12-23 15:23:00.440360"], ["updated_at", "2014-12-23 15:23:00.440360"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 4], ["creator_id", 4], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.443341"], ["updated_at", "2014-12-23 15:23:00.443341"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 4 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 4], ["creator_id", 4], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.446302"], ["updated_at", "2014-12-23 15:23:00.446302"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 4]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.449336"], ["updated_at", "2014-12-23 15:23:00.449336"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.451476"], ["updated_at", "2014-12-23 15:23:00.451476"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 4], ["created_at", "2014-12-23 15:23:00.453078"], ["updated_at", "2014-12-23 15:23:00.453078"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.454570"], ["closer_id", 5], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.455505"], ["id", 5]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:23:00.457708"], ["id", 5]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.459409"], ["updated_at", "2014-12-23 15:23:00.459409"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.461508"], ["updated_at", "2014-12-23 15:23:00.461508"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 5], ["created_at", "2014-12-23 15:23:00.463064"], ["updated_at", "2014-12-23 15:23:00.463064"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.464962"], ["updated_at", "2014-12-23 15:23:00.464962"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.467092"], ["updated_at", "2014-12-23 15:23:00.467092"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 6], ["created_at", "2014-12-23 15:23:00.468632"], ["updated_at", "2014-12-23 15:23:00.468632"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 7 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7], ["created_at", "2014-12-23 15:23:00.471923"], ["updated_at", "2014-12-23 15:23:00.471923"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.471923')[0m [["thread_id", 7]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 7 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 7], ["creator_id", 7], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.476686"], ["updated_at", "2014-12-23 15:23:00.476686"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.471923')[0m [["thread_id", 7]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 7]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:23:00.480641' WHERE "commontator_subscriptions"."id" = ? [["id", 3]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:23:00.480641')[0m [["thread_id", 7]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.484115"], ["updated_at", "2014-12-23 15:23:00.484115"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.486302"], ["updated_at", "2014-12-23 15:23:00.486302"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 7], ["created_at", "2014-12-23 15:23:00.487906"], ["updated_at", "2014-12-23 15:23:00.487906"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", nil]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["commontable_id", nil], ["updated_at", "2014-12-23 15:23:00.489903"], ["id", 8]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.491841"], ["updated_at", "2014-12-23 15:23:00.491841"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.494031"], ["updated_at", "2014-12-23 15:23:00.494031"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 8]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 8], ["created_at", "2014-12-23 15:23:00.495622"], ["updated_at", "2014-12-23 15:23:00.495622"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 9) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 9], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["created_at", "2014-12-23 15:23:00.498962"], ["updated_at", "2014-12-23 15:23:00.498962"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.500637"], ["updated_at", "2014-12-23 15:23:00.500637"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 9 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 10) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 10], ["subscriber_type", "DummyUser"], ["thread_id", 9], ["created_at", "2014-12-23 15:23:00.503805"], ["updated_at", "2014-12-23 15:23:00.503805"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 9]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.507483"], ["updated_at", "2014-12-23 15:23:00.507483"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.510221"], ["updated_at", "2014-12-23 15:23:00.510221"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.511765"], ["updated_at", "2014-12-23 15:23:00.511765"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.513460"], ["updated_at", "2014-12-23 15:23:00.513460"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.520118"], ["updated_at", "2014-12-23 15:23:00.520118"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.527388"], ["updated_at", "2014-12-23 15:23:00.527388"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.530396"], ["updated_at", "2014-12-23 15:23:00.530396"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.533118"], ["updated_at", "2014-12-23 15:23:00.533118"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.538019"], ["updated_at", "2014-12-23 15:23:00.538019"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.544945"], ["updated_at", "2014-12-23 15:23:00.544945"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 7]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.551499"], ["updated_at", "2014-12-23 15:23:00.551499"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.557230"], ["updated_at", "2014-12-23 15:23:00.557230"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.559310"], ["updated_at", "2014-12-23 15:23:00.559310"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.562151"], ["updated_at", "2014-12-23 15:23:00.562151"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.566127"], ["updated_at", "2014-12-23 15:23:00.566127"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 6]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.578519"], ["updated_at", "2014-12-23 15:23:00.578519"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.581348"], ["updated_at", "2014-12-23 15:23:00.581348"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.584009"], ["updated_at", "2014-12-23 15:23:00.584009"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.587500"], ["updated_at", "2014-12-23 15:23:00.587500"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 6]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.596604"], ["updated_at", "2014-12-23 15:23:00.596604"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 7]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 10 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10], ["created_at", "2014-12-23 15:23:00.604402"], ["updated_at", "2014-12-23 15:23:00.604402"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"10"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 8]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/10 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 10]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.613984"], ["updated_at", "2014-12-23 15:23:00.613984"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.616444"], ["updated_at", "2014-12-23 15:23:00.616444"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.619180"], ["updated_at", "2014-12-23 15:23:00.619180"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.624876"], ["updated_at", "2014-12-23 15:23:00.624876"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.626670"], ["updated_at", "2014-12-23 15:23:00.626670"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.628636"], ["updated_at", "2014-12-23 15:23:00.628636"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 10], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.631021"], ["updated_at", "2014-12-23 15:23:00.631021"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.633106"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.636075"], ["updated_at", "2014-12-23 15:23:00.636075"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.638863"], ["updated_at", "2014-12-23 15:23:00.638863"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.641478"], ["updated_at", "2014-12-23 15:23:00.641478"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:00.643389') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.645099"], ["updated_at", "2014-12-23 15:23:00.645099"]] [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "deleted_at", "editor_type", "editor_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["thread_id", 10], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["deleted_at", "2014-12-23 15:23:00.643389"], ["editor_type", "DummyUser"], ["editor_id", 13], ["created_at", "2014-12-23 15:23:00.646044"], ["updated_at", "2014-12-23 15:23:00.646044"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:23:00.648582"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.651544"], ["updated_at", "2014-12-23 15:23:00.651544"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.654286"], ["updated_at", "2014-12-23 15:23:00.654286"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.656918"], ["updated_at", "2014-12-23 15:23:00.656918"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 10], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.660058"], ["updated_at", "2014-12-23 15:23:00.660058"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.662171"], ["updated_at", "2014-12-23 15:23:00.662171"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 10 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 13], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.664354"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.670987"], ["updated_at", "2014-12-23 15:23:00.670987"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.672862"], ["updated_at", "2014-12-23 15:23:00.672862"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 10]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (11.5ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.691309"], ["updated_at", "2014-12-23 15:23:00.691309"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:23:00.693226"], ["updated_at", "2014-12-23 15:23:00.693226"]] [1m[35m (0.9ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.697876"], ["updated_at", "2014-12-23 15:23:00.697876"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.699555"], ["updated_at", "2014-12-23 15:23:00.699555"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.701324"], ["updated_at", "2014-12-23 15:23:00.701324"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.703741"], ["updated_at", "2014-12-23 15:23:00.703741"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.710486"], ["updated_at", "2014-12-23 15:23:00.710486"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.713218"], ["updated_at", "2014-12-23 15:23:00.713218"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.715821"], ["updated_at", "2014-12-23 15:23:00.715821"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.718932"], ["updated_at", "2014-12-23 15:23:00.718932"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"11"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.737210"], ["updated_at", "2014-12-23 15:23:00.737210"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.739829"], ["updated_at", "2014-12-23 15:23:00.739829"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.742311"], ["updated_at", "2014-12-23 15:23:00.742311"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.745093"], ["updated_at", "2014-12-23 15:23:00.745093"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."id" != 11 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:23:00.748802"], ["updated_at", "2014-12-23 15:23:00.749676"], ["id", 11]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.753755"], ["updated_at", "2014-12-23 15:23:00.753755"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.755374"], ["updated_at", "2014-12-23 15:23:00.755374"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.757059"], ["updated_at", "2014-12-23 15:23:00.757059"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.759339"], ["updated_at", "2014-12-23 15:23:00.759339"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.763474"], ["updated_at", "2014-12-23 15:23:00.763474"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Another thing"], ["created_at", "2014-12-23 15:23:00.771327"], ["updated_at", "2014-12-23 15:23:00.771327"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "And this too"], ["created_at", "2014-12-23 15:23:00.778712"], ["updated_at", "2014-12-23 15:23:00.778712"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.785413"], ["updated_at", "2014-12-23 15:23:00.785413"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.787195"], ["updated_at", "2014-12-23 15:23:00.787195"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.789056"], ["updated_at", "2014-12-23 15:23:00.789056"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.791373"], ["updated_at", "2014-12-23 15:23:00.791373"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.803017"], ["updated_at", "2014-12-23 15:23:00.803017"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.815056"], ["updated_at", "2014-12-23 15:23:00.815056"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.816731"], ["updated_at", "2014-12-23 15:23:00.816731"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.818462"], ["updated_at", "2014-12-23 15:23:00.818462"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.820823"], ["updated_at", "2014-12-23 15:23:00.820823"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.826792"], ["updated_at", "2014-12-23 15:23:00.826792"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.830898"], ["updated_at", "2014-12-23 15:23:00.830898"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.837243"], ["updated_at", "2014-12-23 15:23:00.837243"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.839942"], ["updated_at", "2014-12-23 15:23:00.839942"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.842594"], ["updated_at", "2014-12-23 15:23:00.842594"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.845676"], ["updated_at", "2014-12-23 15:23:00.845676"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.864285"], ["updated_at", "2014-12-23 15:23:00.864285"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.866908"], ["updated_at", "2014-12-23 15:23:00.866908"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.869710"], ["updated_at", "2014-12-23 15:23:00.869710"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.872823"], ["updated_at", "2014-12-23 15:23:00.872823"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.878915"], ["updated_at", "2014-12-23 15:23:00.878915"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.883301"], ["updated_at", "2014-12-23 15:23:00.883301"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.889734"], ["updated_at", "2014-12-23 15:23:00.889734"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.892446"], ["updated_at", "2014-12-23 15:23:00.892446"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.895075"], ["updated_at", "2014-12-23 15:23:00.895075"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.898156"], ["updated_at", "2014-12-23 15:23:00.898156"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.904283"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"5", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.923559"], ["updated_at", "2014-12-23 15:23:00.923559"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.926445"], ["updated_at", "2014-12-23 15:23:00.926445"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.929183"], ["updated_at", "2014-12-23 15:23:00.929183"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.932260"], ["updated_at", "2014-12-23 15:23:00.932260"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:00.937946') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:23:00.937946"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.939603"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.947547"], ["updated_at", "2014-12-23 15:23:00.947547"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:23:00.949609"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.956190"], ["updated_at", "2014-12-23 15:23:00.956190"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.958909"], ["updated_at", "2014-12-23 15:23:00.958909"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:00.961539"], ["updated_at", "2014-12-23 15:23:00.961539"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:00.964625"], ["updated_at", "2014-12-23 15:23:00.964625"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:00.969194') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:23:00.969194"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:00.970515"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.974299"], ["updated_at", "2014-12-23 15:23:00.974299"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:00.976536"], ["updated_at", "2014-12-23 15:23:00.976536"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:23:00.978474"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:00.980678') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:23:00.980678"], ["editor_id", 13], ["updated_at", "2014-12-23 15:23:00.981939"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-12-23 15:23:00.986421"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:00.988739') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:23:00.988739"], ["editor_id", 13], ["updated_at", "2014-12-23 15:23:00.990134"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:00.996293"], ["updated_at", "2014-12-23 15:23:00.996293"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:00.999441"], ["updated_at", "2014-12-23 15:23:00.999441"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.002275"], ["updated_at", "2014-12-23 15:23:01.002275"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.005522"], ["updated_at", "2014-12-23 15:23:01.005522"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.006702') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:23:01.006702"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:01.008187"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:23:01.015943"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.022163"], ["updated_at", "2014-12-23 15:23:01.022163"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.023061') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:23:01.023061"], ["editor_id", 13], ["updated_at", "2014-12-23 15:23:01.024397"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 13]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:01.029009"], ["updated_at", "2014-12-23 15:23:01.029009"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 12], ["updated_at", "2014-12-23 15:23:01.031598"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.032357') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:23:01.032357"], ["updated_at", "2014-12-23 15:23:01.033339"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.040326"], ["updated_at", "2014-12-23 15:23:01.040326"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.042905"], ["updated_at", "2014-12-23 15:23:01.042905"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.045441"], ["updated_at", "2014-12-23 15:23:01.045441"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.048400"], ["updated_at", "2014-12-23 15:23:01.048400"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.049596') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:23:01.049596"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:23:01.051054"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:23:01.057014"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.060756"], ["updated_at", "2014-12-23 15:23:01.060756"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:01.062920"], ["updated_at", "2014-12-23 15:23:01.062920"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.063807') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:23:01.063807"], ["updated_at", "2014-12-23 15:23:01.064968"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-12-23 15:23:01.068495"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:23:01.071468') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:23:01.071468"], ["editor_id", 12], ["updated_at", "2014-12-23 15:23:01.072649"], ["id", 5]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 13], ["updated_at", "2014-12-23 15:23:01.076348"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.082375"], ["updated_at", "2014-12-23 15:23:01.082375"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.085378"], ["updated_at", "2014-12-23 15:23:01.085378"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.088246"], ["updated_at", "2014-12-23 15:23:01.088246"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.091366"], ["updated_at", "2014-12-23 15:23:01.091366"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.100670"], ["updated_at", "2014-12-23 15:23:01.100670"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.107279"], ["updated_at", "2014-12-23 15:23:01.107279"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.109330"], ["updated_at", "2014-12-23 15:23:01.109330"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.111994"], ["updated_at", "2014-12-23 15:23:01.111994"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.115168"], ["updated_at", "2014-12-23 15:23:01.115168"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.116648"], ["updated_at", "2014-12-23 15:23:01.116648"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:23:01.133804"], ["updated_at", "2014-12-23 15:23:01.133804"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 22ms (ActiveRecord: 0.8ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 18ms (ActiveRecord: 0.5ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "f"], ["updated_at", "2014-12-23 15:23:01.168790"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "t"], ["updated_at", "2014-12-23 15:23:01.175567"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 8ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.184942"], ["updated_at", "2014-12-23 15:23:01.184942"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.188005"], ["updated_at", "2014-12-23 15:23:01.188005"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.190881"], ["updated_at", "2014-12-23 15:23:01.190881"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.194066"], ["updated_at", "2014-12-23 15:23:01.194066"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.202209"], ["updated_at", "2014-12-23 15:23:01.202209"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.209455"], ["updated_at", "2014-12-23 15:23:01.209455"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.212247"], ["updated_at", "2014-12-23 15:23:01.212247"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.214991"], ["updated_at", "2014-12-23 15:23:01.214991"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.218149"], ["updated_at", "2014-12-23 15:23:01.218149"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.219759"], ["updated_at", "2014-12-23 15:23:01.219759"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:23:01.225403"], ["updated_at", "2014-12-23 15:23:01.225403"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "t"], ["updated_at", "2014-12-23 15:23:01.242881"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "f"], ["updated_at", "2014-12-23 15:23:01.249444"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.257598"], ["updated_at", "2014-12-23 15:23:01.257598"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.259542"], ["updated_at", "2014-12-23 15:23:01.259542"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.262341"], ["updated_at", "2014-12-23 15:23:01.262341"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.266031"], ["updated_at", "2014-12-23 15:23:01.266031"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 12], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 12], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:23:01.269744"], ["updated_at", "2014-12-23 15:23:01.269744"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.279910"], ["updated_at", "2014-12-23 15:23:01.279910"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.287161"], ["updated_at", "2014-12-23 15:23:01.287161"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.289918"], ["updated_at", "2014-12-23 15:23:01.289918"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.292693"], ["updated_at", "2014-12-23 15:23:01.292693"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.295846"], ["updated_at", "2014-12-23 15:23:01.295846"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.297349"], ["updated_at", "2014-12-23 15:23:01.297349"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:23:01.300148"], ["updated_at", "2014-12-23 15:23:01.300148"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 8ms (ActiveRecord: 0.6ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:23:01.324296"], ["updated_at", "2014-12-23 15:23:01.324296"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 5]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"5"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 11]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 12]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"], ["voter_id", 13], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 5]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 5], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.339745"], ["updated_at", "2014-12-23 15:23:01.339745"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.341661"], ["updated_at", "2014-12-23 15:23:01.341661"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.344436"], ["updated_at", "2014-12-23 15:23:01.344436"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.348135"], ["updated_at", "2014-12-23 15:23:01.348135"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.349785"], ["updated_at", "2014-12-23 15:23:01.349785"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:01.354702"], ["updated_at", "2014-12-23 15:23:01.354702"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:23:01.361112"], ["updated_at", "2014-12-23 15:23:01.361112"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.364079"], ["updated_at", "2014-12-23 15:23:01.364079"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:23:01.366905"], ["updated_at", "2014-12-23 15:23:01.366905"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:23:01.370103"], ["updated_at", "2014-12-23 15:23:01.370103"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:23:01.371580"], ["updated_at", "2014-12-23 15:23:01.371580"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["created_at", "2014-12-23 15:23:01.374587"], ["updated_at", "2014-12-23 15:23:01.374587"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"11", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 11]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:23:01.379203"], ["updated_at", "2014-12-23 15:23:01.379203"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 11]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Redirected to http://test.host/commontator/threads/11 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (1.4ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar, "creator_id" integer, "editor_type" varchar, "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.7ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.7ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.8ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar, "commontable_id" integer, "closed_at" datetime, "closer_type" varchar, "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.7ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar, "voter_id" integer, "voter_type" varchar, "vote_flag" boolean, "vote_scope" varchar, "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.649596"], ["updated_at", "2014-12-23 15:24:05.649596"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.666803"], ["updated_at", "2014-12-23 15:24:05.666803"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.676399"], ["updated_at", "2014-12-23 15:24:05.676399"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.696145"], ["updated_at", "2014-12-23 15:24:05.696145"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) [1m[35m (1.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.705472"], ["updated_at", "2014-12-23 15:24:05.705472"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.708515"], ["updated_at", "2014-12-23 15:24:05.708515"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.711295"], ["updated_at", "2014-12-23 15:24:05.711295"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.718018"], ["updated_at", "2014-12-23 15:24:05.718018"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.728378"], ["updated_at", "2014-12-23 15:24:05.728378"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.735479"], ["updated_at", "2014-12-23 15:24:05.735479"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.741534"], ["updated_at", "2014-12-23 15:24:05.741534"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.744504"], ["updated_at", "2014-12-23 15:24:05.744504"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.747400"], ["updated_at", "2014-12-23 15:24:05.747400"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.751186"], ["updated_at", "2014-12-23 15:24:05.751186"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.764981"], ["updated_at", "2014-12-23 15:24:05.764981"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.767911"], ["updated_at", "2014-12-23 15:24:05.767911"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.770781"], ["updated_at", "2014-12-23 15:24:05.770781"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.774743"], ["updated_at", "2014-12-23 15:24:05.774743"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 11ms (ActiveRecord: 0.3ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.791654"], ["updated_at", "2014-12-23 15:24:05.791654"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:05.799343"], ["updated_at", "2014-12-23 15:24:05.799343"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 3]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.820745"], ["updated_at", "2014-12-23 15:24:05.820745"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.822885"], ["updated_at", "2014-12-23 15:24:05.822885"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ?[0m [["thread_id", 1]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (13.9ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.846907"], ["updated_at", "2014-12-23 15:24:05.846907"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:05.849895"], ["updated_at", "2014-12-23 15:24:05.849895"]] [1m[35m (0.9ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.854119"], ["updated_at", "2014-12-23 15:24:05.854119"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.857199"], ["updated_at", "2014-12-23 15:24:05.857199"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.859771"], ["updated_at", "2014-12-23 15:24:05.859771"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("thread_id", "subscriber_id", "subscriber_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["thread_id", 2], ["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["created_at", "2014-12-23 15:24:05.862162"], ["updated_at", "2014-12-23 15:24:05.862162"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:05.862162')[0m [["thread_id", 2]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.871159"], ["updated_at", "2014-12-23 15:24:05.871159"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:05.862162')[0m [["thread_id", 2]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:05.875883"], ["updated_at", "2014-12-23 15:24:05.875883"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:05.862162')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:24:05.878450' WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:05.878450') [["thread_id", 2]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.884728"], ["updated_at", "2014-12-23 15:24:05.884728"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.886433"], ["updated_at", "2014-12-23 15:24:05.886433"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.888208"], ["updated_at", "2014-12-23 15:24:05.888208"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.891781"], ["updated_at", "2014-12-23 15:24:05.891781"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.900451"], ["updated_at", "2014-12-23 15:24:05.900451"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.902734"], ["updated_at", "2014-12-23 15:24:05.902734"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.904900"], ["updated_at", "2014-12-23 15:24:05.904900"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.907721"], ["updated_at", "2014-12-23 15:24:05.907721"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.928866"], ["updated_at", "2014-12-23 15:24:05.928866"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.931757"], ["updated_at", "2014-12-23 15:24:05.931757"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.934420"], ["updated_at", "2014-12-23 15:24:05.934420"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.937510"], ["updated_at", "2014-12-23 15:24:05.937510"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:05.941480"], ["updated_at", "2014-12-23 15:24:05.942903"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.948311"], ["updated_at", "2014-12-23 15:24:05.948311"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.951093"], ["updated_at", "2014-12-23 15:24:05.951093"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.953709"], ["updated_at", "2014-12-23 15:24:05.953709"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.956902"], ["updated_at", "2014-12-23 15:24:05.956902"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:05.961731"], ["updated_at", "2014-12-23 15:24:05.961731"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Another thing"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Another thing"], ["created_at", "2014-12-23 15:24:05.970322"], ["updated_at", "2014-12-23 15:24:05.970322"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"And this too"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "And this too"], ["created_at", "2014-12-23 15:24:05.978815"], ["updated_at", "2014-12-23 15:24:05.978815"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:05.984460"], ["updated_at", "2014-12-23 15:24:05.984460"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:05.986305"], ["updated_at", "2014-12-23 15:24:05.986305"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:05.988100"], ["updated_at", "2014-12-23 15:24:05.988100"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:05.990532"], ["updated_at", "2014-12-23 15:24:05.990532"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.001826"], ["updated_at", "2014-12-23 15:24:06.001826"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.020298"], ["updated_at", "2014-12-23 15:24:06.020298"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.022571"], ["updated_at", "2014-12-23 15:24:06.022571"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.024619"], ["updated_at", "2014-12-23 15:24:06.024619"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.026978"], ["updated_at", "2014-12-23 15:24:06.026978"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.2ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Completed 403 Forbidden in 5ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.035781"], ["updated_at", "2014-12-23 15:24:06.035781"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.041167"], ["updated_at", "2014-12-23 15:24:06.041167"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.047672"], ["updated_at", "2014-12-23 15:24:06.047672"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.050411"], ["updated_at", "2014-12-23 15:24:06.050411"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.053052"], ["updated_at", "2014-12-23 15:24:06.053052"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.056440"], ["updated_at", "2014-12-23 15:24:06.056440"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[35m (1.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.076775"], ["updated_at", "2014-12-23 15:24:06.076775"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.079536"], ["updated_at", "2014-12-23 15:24:06.079536"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.081965"], ["updated_at", "2014-12-23 15:24:06.081965"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.084683"], ["updated_at", "2014-12-23 15:24:06.084683"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.090415"], ["updated_at", "2014-12-23 15:24:06.090415"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.095118"], ["updated_at", "2014-12-23 15:24:06.095118"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.102398"], ["updated_at", "2014-12-23 15:24:06.102398"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.105178"], ["updated_at", "2014-12-23 15:24:06.105178"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.109113"], ["updated_at", "2014-12-23 15:24:06.109113"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.112285"], ["updated_at", "2014-12-23 15:24:06.112285"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["body", "Something else"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.118303"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.4ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.3ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 6ms (ActiveRecord: 1.0ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.139034"], ["updated_at", "2014-12-23 15:24:06.139034"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.141081"], ["updated_at", "2014-12-23 15:24:06.141081"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.143119"], ["updated_at", "2014-12-23 15:24:06.143119"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.145475"], ["updated_at", "2014-12-23 15:24:06.145475"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.151171') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:06.151171"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.152900"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.162344"], ["updated_at", "2014-12-23 15:24:06.162344"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:06.164573"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.171464"], ["updated_at", "2014-12-23 15:24:06.171464"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.174243"], ["updated_at", "2014-12-23 15:24:06.174243"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.177352"], ["updated_at", "2014-12-23 15:24:06.177352"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.180719"], ["updated_at", "2014-12-23 15:24:06.180719"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.185428') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:06.185428"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.186811"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.192192"], ["updated_at", "2014-12-23 15:24:06.192192"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.194757"], ["updated_at", "2014-12-23 15:24:06.194757"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:06.196788"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.199203') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:06.199203"], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:06.200494"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-12-23 15:24:06.204674"], ["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.206843') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:06.206843"], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:06.208170"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.214287"], ["updated_at", "2014-12-23 15:24:06.214287"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.217271"], ["updated_at", "2014-12-23 15:24:06.217271"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.220439"], ["updated_at", "2014-12-23 15:24:06.220439"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.224881"], ["updated_at", "2014-12-23 15:24:06.224881"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.226096') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:06.226096"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.227414"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:06.235224"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 31ms (ActiveRecord: 0.2ms) [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.268273"], ["updated_at", "2014-12-23 15:24:06.268273"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.269181') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:06.269181"], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:06.270620"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.275890"], ["updated_at", "2014-12-23 15:24:06.275890"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 1], ["updated_at", "2014-12-23 15:24:06.278419"], ["id", 1]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.279146') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:06.279146"], ["updated_at", "2014-12-23 15:24:06.280149"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.287374"], ["updated_at", "2014-12-23 15:24:06.287374"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.290135"], ["updated_at", "2014-12-23 15:24:06.290135"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.292853"], ["updated_at", "2014-12-23 15:24:06.292853"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.295984"], ["updated_at", "2014-12-23 15:24:06.295984"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.297097') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:06.297097"], ["editor_id", 1], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.298567"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:06.304839"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.308547"], ["updated_at", "2014-12-23 15:24:06.308547"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.311023"], ["updated_at", "2014-12-23 15:24:06.311023"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.312269') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:06.312269"], ["updated_at", "2014-12-23 15:24:06.313602"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:06.317888"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:06.321636') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:06.321636"], ["editor_id", 1], ["updated_at", "2014-12-23 15:24:06.323387"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:06.327572"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.333947"], ["updated_at", "2014-12-23 15:24:06.333947"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.336873"], ["updated_at", "2014-12-23 15:24:06.336873"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.339757"], ["updated_at", "2014-12-23 15:24:06.339757"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.344036"], ["updated_at", "2014-12-23 15:24:06.344036"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.353763"], ["updated_at", "2014-12-23 15:24:06.353763"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.359792"], ["updated_at", "2014-12-23 15:24:06.359792"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.361452"], ["updated_at", "2014-12-23 15:24:06.361452"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.363247"], ["updated_at", "2014-12-23 15:24:06.363247"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.365563"], ["updated_at", "2014-12-23 15:24:06.365563"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.366697"], ["updated_at", "2014-12-23 15:24:06.366697"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:06.378261"], ["updated_at", "2014-12-23 15:24:06.378261"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 14ms (ActiveRecord: 0.9ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "f"], ["updated_at", "2014-12-23 15:24:06.396568"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "t"], ["updated_at", "2014-12-23 15:24:06.402974"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.411976"], ["updated_at", "2014-12-23 15:24:06.411976"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.413899"], ["updated_at", "2014-12-23 15:24:06.413899"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.416141"], ["updated_at", "2014-12-23 15:24:06.416141"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.418585"], ["updated_at", "2014-12-23 15:24:06.418585"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.428005"], ["updated_at", "2014-12-23 15:24:06.428005"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.435306"], ["updated_at", "2014-12-23 15:24:06.435306"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.438040"], ["updated_at", "2014-12-23 15:24:06.438040"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.441199"], ["updated_at", "2014-12-23 15:24:06.441199"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.444559"], ["updated_at", "2014-12-23 15:24:06.444559"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.446217"], ["updated_at", "2014-12-23 15:24:06.446217"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:06.452980"], ["updated_at", "2014-12-23 15:24:06.452980"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 10ms (ActiveRecord: 0.6ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "t"], ["updated_at", "2014-12-23 15:24:06.472082"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "f"], ["updated_at", "2014-12-23 15:24:06.479048"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.490590"], ["updated_at", "2014-12-23 15:24:06.490590"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.493284"], ["updated_at", "2014-12-23 15:24:06.493284"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.496212"], ["updated_at", "2014-12-23 15:24:06.496212"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.499457"], ["updated_at", "2014-12-23 15:24:06.499457"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 1], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 1], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:06.502641"], ["updated_at", "2014-12-23 15:24:06.502641"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (6.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.518348"], ["updated_at", "2014-12-23 15:24:06.518348"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.525586"], ["updated_at", "2014-12-23 15:24:06.525586"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.527540"], ["updated_at", "2014-12-23 15:24:06.527540"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.529421"], ["updated_at", "2014-12-23 15:24:06.529421"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.531807"], ["updated_at", "2014-12-23 15:24:06.531807"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.532955"], ["updated_at", "2014-12-23 15:24:06.532955"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:06.535931"], ["updated_at", "2014-12-23 15:24:06.535931"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 9ms (ActiveRecord: 0.7ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:06.558377"], ["updated_at", "2014-12-23 15:24:06.558377"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.575258"], ["updated_at", "2014-12-23 15:24:06.575258"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.578457"], ["updated_at", "2014-12-23 15:24:06.578457"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.581236"], ["updated_at", "2014-12-23 15:24:06.581236"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.584295"], ["updated_at", "2014-12-23 15:24:06.584295"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.585692"], ["updated_at", "2014-12-23 15:24:06.585692"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.590197"], ["updated_at", "2014-12-23 15:24:06.590197"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.596530"], ["updated_at", "2014-12-23 15:24:06.596530"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.599424"], ["updated_at", "2014-12-23 15:24:06.599424"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.602177"], ["updated_at", "2014-12-23 15:24:06.602177"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.605965"], ["updated_at", "2014-12-23 15:24:06.605965"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.608168"], ["updated_at", "2014-12-23 15:24:06.608168"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:06.612483"], ["updated_at", "2014-12-23 15:24:06.612483"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"2", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.618139"], ["updated_at", "2014-12-23 15:24:06.618139"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.627704"], ["updated_at", "2014-12-23 15:24:06.627704"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.630580"], ["updated_at", "2014-12-23 15:24:06.630580"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.633140"], ["updated_at", "2014-12-23 15:24:06.633140"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.640444"], ["updated_at", "2014-12-23 15:24:06.640444"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.643144"], ["updated_at", "2014-12-23 15:24:06.643144"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.645680"], ["updated_at", "2014-12-23 15:24:06.645680"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 6ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.666859"], ["updated_at", "2014-12-23 15:24:06.666859"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.669745"], ["updated_at", "2014-12-23 15:24:06.669745"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.672418"], ["updated_at", "2014-12-23 15:24:06.672418"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:06.678638"], ["updated_at", "2014-12-23 15:24:06.679692"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.686901"], ["updated_at", "2014-12-23 15:24:06.686901"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.689944"], ["updated_at", "2014-12-23 15:24:06.689944"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.692770"], ["updated_at", "2014-12-23 15:24:06.692770"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.2ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.696588"], ["closer_id", 1], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.698355"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 6ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:24:06.704881"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.707878"], ["updated_at", "2014-12-23 15:24:06.709460"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.715120"], ["updated_at", "2014-12-23 15:24:06.715120"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.717212"], ["updated_at", "2014-12-23 15:24:06.717212"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.719916"], ["updated_at", "2014-12-23 15:24:06.719916"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:06.721290"], ["updated_at", "2014-12-23 15:24:06.722317"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:24:06.729340"], ["id", 2]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.737060"], ["updated_at", "2014-12-23 15:24:06.737060"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.740066"], ["updated_at", "2014-12-23 15:24:06.740066"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.743760"], ["updated_at", "2014-12-23 15:24:06.743760"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.744938"], ["updated_at", "2014-12-23 15:24:06.745882"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:24:06.749874"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.753322"], ["updated_at", "2014-12-23 15:24:06.754294"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:24:06.756936"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.763510"], ["updated_at", "2014-12-23 15:24:06.763510"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.767091"], ["updated_at", "2014-12-23 15:24:06.767091"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:06.769649"], ["updated_at", "2014-12-23 15:24:06.769649"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 1) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:06.774056"], ["updated_at", "2014-12-23 15:24:06.774056"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:06.774056')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 1 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 1], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.779517"], ["updated_at", "2014-12-23 15:24:06.779517"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:06.774056')[0m [["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 1], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:24:06.783997' WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:06.783997')[0m [["thread_id", 2]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.787486"], ["updated_at", "2014-12-23 15:24:06.787486"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.789761"], ["updated_at", "2014-12-23 15:24:06.789761"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 3], ["created_at", "2014-12-23 15:24:06.793103"], ["updated_at", "2014-12-23 15:24:06.793103"]] [1m[35m (0.8ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", nil]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["commontable_id", nil], ["updated_at", "2014-12-23 15:24:06.795612"], ["id", 3]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.797791"], ["updated_at", "2014-12-23 15:24:06.797791"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.799981"], ["updated_at", "2014-12-23 15:24:06.799981"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 4], ["created_at", "2014-12-23 15:24:06.801647"], ["updated_at", "2014-12-23 15:24:06.801647"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["created_at", "2014-12-23 15:24:06.805275"], ["updated_at", "2014-12-23 15:24:06.805275"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.806906"], ["updated_at", "2014-12-23 15:24:06.806906"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["created_at", "2014-12-23 15:24:06.810141"], ["updated_at", "2014-12-23 15:24:06.810141"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 4]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 4]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.819730"], ["updated_at", "2014-12-23 15:24:06.819730"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.822562"], ["updated_at", "2014-12-23 15:24:06.822562"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 5], ["created_at", "2014-12-23 15:24:06.824998"], ["updated_at", "2014-12-23 15:24:06.824998"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.826575"], ["closer_id", 5], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.827531"], ["id", 5]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:24:06.829830"], ["id", 5]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.831354"], ["updated_at", "2014-12-23 15:24:06.831354"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.833481"], ["updated_at", "2014-12-23 15:24:06.833481"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 6], ["created_at", "2014-12-23 15:24:06.835124"], ["updated_at", "2014-12-23 15:24:06.835124"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 6]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["created_at", "2014-12-23 15:24:06.838434"], ["updated_at", "2014-12-23 15:24:06.838434"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.840193"], ["updated_at", "2014-12-23 15:24:06.840193"]] [1m[36m (0.5ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 6]] [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 6 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 7) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 7], ["subscriber_type", "DummyUser"], ["thread_id", 6], ["created_at", "2014-12-23 15:24:06.844871"], ["updated_at", "2014-12-23 15:24:06.844871"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 6]] [1m[35mDummyUser Load (0.1ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 6]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.849134"], ["updated_at", "2014-12-23 15:24:06.849134"]] [1m[35m (4.9ms)[0m commit transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.856854"], ["updated_at", "2014-12-23 15:24:06.856854"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 7], ["created_at", "2014-12-23 15:24:06.859738"], ["updated_at", "2014-12-23 15:24:06.859738"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.862084"], ["updated_at", "2014-12-23 15:24:06.862084"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.865040"], ["updated_at", "2014-12-23 15:24:06.865040"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 8], ["created_at", "2014-12-23 15:24:06.867533"], ["updated_at", "2014-12-23 15:24:06.867533"]] [1m[36m (0.8ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 9 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 8], ["creator_id", 9], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.871532"], ["updated_at", "2014-12-23 15:24:06.871532"]] [1m[36m (1.0ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 9 AND "commontator_comments"."thread_id" = 8 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 8], ["creator_id", 9], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:06.875684"], ["updated_at", "2014-12-23 15:24:06.875684"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 8]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 8]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:06.879141"], ["updated_at", "2014-12-23 15:24:06.879141"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.881415"], ["updated_at", "2014-12-23 15:24:06.881415"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:24:06.883071"], ["updated_at", "2014-12-23 15:24:06.883071"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 9 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 9], ["creator_id", 10], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:06.886220"], ["updated_at", "2014-12-23 15:24:06.886220"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."id" != 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:06.887831"], ["closer_id", 10], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:06.888830"], ["id", 9]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 9], ["id", 4]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 9], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [0m [["id", 9]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-12-23 15:24:06.894142"], ["id", 9]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 9], ["commontable_type", "DummyModel"], ["created_at", "2014-12-23 15:24:06.895525"], ["updated_at", "2014-12-23 15:24:06.895525"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 9]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 9], ["id", 4]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 9]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 9], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ? [["thread_id", 10], ["id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:06.900180"], ["updated_at", "2014-12-23 15:24:06.900180"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.031468"], ["updated_at", "2014-12-23 15:24:07.031468"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.033385"], ["updated_at", "2014-12-23 15:24:07.033385"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:24:07.035158"], ["updated_at", "2014-12-23 15:24:07.035158"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.036225"], ["updated_at", "2014-12-23 15:24:07.036225"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 12) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 12], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["created_at", "2014-12-23 15:24:07.038651"], ["updated_at", "2014-12-23 15:24:07.038651"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 11 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 13) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 13], ["subscriber_type", "DummyUser"], ["thread_id", 11], ["created_at", "2014-12-23 15:24:07.040823"], ["updated_at", "2014-12-23 15:24:07.040823"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:07.042933"], ["updated_at", "2014-12-23 15:24:07.042933"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 11]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 12]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 13]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (0.9ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (2.1ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 11.1ms Sent mail to Undisclosed Recipients (2.7ms) Date: Tue, 23 Dec 2014 09:24:07 -0600 From: no-reply@dummy.com To: Undisclosed Recipients Message-ID: <54998917e962_4753fe2d1465bc421233@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #12 posted a comment on DummyModel #10 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #10.
[1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.071048"], ["updated_at", "2014-12-23 15:24:07.071048"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.073116"], ["updated_at", "2014-12-23 15:24:07.073116"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:24:07.075033"], ["updated_at", "2014-12-23 15:24:07.075033"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.078233"], ["updated_at", "2014-12-23 15:24:07.078233"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.081085"], ["updated_at", "2014-12-23 15:24:07.081085"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 10]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:24:07.083626"], ["updated_at", "2014-12-23 15:24:07.083626"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:07.086952"], ["updated_at", "2014-12-23 15:24:07.086952"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["body", "Something else"], ["editor_id", 12], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:07.089534"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.091954"], ["updated_at", "2014-12-23 15:24:07.091954"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.093745"], ["updated_at", "2014-12-23 15:24:07.093745"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:24:07.095978"], ["updated_at", "2014-12-23 15:24:07.095978"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:07.097497') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.098849"], ["updated_at", "2014-12-23 15:24:07.098849"]] [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "deleted_at", "editor_type", "editor_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["deleted_at", "2014-12-23 15:24:07.097497"], ["editor_type", "DummyUser"], ["editor_id", 13], ["created_at", "2014-12-23 15:24:07.099620"], ["updated_at", "2014-12-23 15:24:07.099620"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:07.101918"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:07.104821"], ["updated_at", "2014-12-23 15:24:07.104821"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.108355"], ["updated_at", "2014-12-23 15:24:07.108355"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 10]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 10 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 10], ["created_at", "2014-12-23 15:24:07.111518"], ["updated_at", "2014-12-23 15:24:07.111518"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 11], ["creator_id", 12], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:07.114672"], ["updated_at", "2014-12-23 15:24:07.114672"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:07.116710"], ["updated_at", "2014-12-23 15:24:07.116710"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 5 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 12 AND "commontator_comments"."thread_id" = 11 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["body", "Something else"], ["editor_id", 13], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:07.118721"], ["id", 5]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m rollback transaction [1m[36m (1.8ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar, "creator_id" integer, "editor_type" varchar, "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.1ms)[0m select sqlite_version(*) [1m[36m (1.0ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [1m[36m (0.8ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")[0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index' [0m [1m[35m (0.1ms)[0m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index' [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id") [1m[36m (0.7ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar, "commontable_id" integer, "closed_at" datetime, "closer_type" varchar, "closer_id" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type") [1m[36m (0.7ms)[0m [1mCREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [1m[36m (0.8ms)[0m [1mCREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar, "voter_id" integer, "voter_type" varchar, "vote_flag" boolean, "vote_scope" varchar, "vote_weight" integer, "created_at" datetime, "updated_at" datetime) [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope") [1m[36m (0.1ms)[0m [1m SELECT sql FROM sqlite_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index' [0m [1m[35m (0.8ms)[0m CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope") [1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m [1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3') [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('1')[0m [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('2') [1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::SharedHelper: test_0001_must show commontator thread ----------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.312291"], ["updated_at", "2014-12-23 15:24:47.312291"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.321961"], ["updated_at", "2014-12-23 15:24:47.321961"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Rendered /Users/dante/Desktop/commontator/app/views/commontator/shared/_thread.html.erb (3.1ms) [1m[36m (0.9ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.339360"], ["updated_at", "2014-12-23 15:24:47.339360"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------------- Commontator::CommentsController: test_0001_won't get new unless authorized -------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.344308"], ["updated_at", "2014-12-23 15:24:47.344308"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.6ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.346480"], ["updated_at", "2014-12-23 15:24:47.346480"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.349256"], ["updated_at", "2014-12-23 15:24:47.349256"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.357961"], ["updated_at", "2014-12-23 15:24:47.357961"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------- Commontator::CommentsController: test_0002_must get new if authorized --------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.369346"], ["updated_at", "2014-12-23 15:24:47.369346"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.371967"], ["updated_at", "2014-12-23 15:24:47.371967"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.375781"], ["updated_at", "2014-12-23 15:24:47.375781"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.379370"], ["updated_at", "2014-12-23 15:24:47.379370"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Processing by Commontator::CommentsController#new as HTML Parameters: {"thread_id"=>"1"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0003_won't create unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.397415"], ["updated_at", "2014-12-23 15:24:47.397415"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.400461"], ["updated_at", "2014-12-23 15:24:47.400461"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.403395"], ["updated_at", "2014-12-23 15:24:47.403395"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.406775"], ["updated_at", "2014-12-23 15:24:47.406775"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."id" != 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:47.410976"], ["updated_at", "2014-12-23 15:24:47.420134"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0004_must create if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.425721"], ["updated_at", "2014-12-23 15:24:47.425721"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.428467"], ["updated_at", "2014-12-23 15:24:47.428467"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.431277"], ["updated_at", "2014-12-23 15:24:47.431277"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.434491"], ["updated_at", "2014-12-23 15:24:47.434491"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.439344"], ["updated_at", "2014-12-23 15:24:47.439344"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 11ms (ActiveRecord: 0.5ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Another thing"}} [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Another thing' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Another thing"], ["created_at", "2014-12-23 15:24:47.452454"], ["updated_at", "2014-12-23 15:24:47.452454"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"And this too"}} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'And this too' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "And this too"], ["created_at", "2014-12-23 15:24:47.460992"], ["updated_at", "2014-12-23 15:24:47.460992"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0005_won't create if double posting ------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.469482"], ["updated_at", "2014-12-23 15:24:47.469482"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.472436"], ["updated_at", "2014-12-23 15:24:47.472436"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.475173"], ["updated_at", "2014-12-23 15:24:47.475173"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.478295"], ["updated_at", "2014-12-23 15:24:47.478295"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.489950"], ["updated_at", "2014-12-23 15:24:47.489950"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ----------------------------------------------------------------------- Commontator::CommentsController: test_0006_won't edit unless authorized ----------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.502730"], ["updated_at", "2014-12-23 15:24:47.502730"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.505782"], ["updated_at", "2014-12-23 15:24:47.505782"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.508851"], ["updated_at", "2014-12-23 15:24:47.508851"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.512214"], ["updated_at", "2014-12-23 15:24:47.512214"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 4ms (ActiveRecord: 0.3ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.520003"], ["updated_at", "2014-12-23 15:24:47.520003"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.524474"], ["updated_at", "2014-12-23 15:24:47.524474"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------ Commontator::CommentsController: test_0007_must edit if authorized ------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.529798"], ["updated_at", "2014-12-23 15:24:47.529798"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.531457"], ["updated_at", "2014-12-23 15:24:47.531457"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.533243"], ["updated_at", "2014-12-23 15:24:47.533243"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.535564"], ["updated_at", "2014-12-23 15:24:47.535564"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::CommentsController#edit as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------- Commontator::CommentsController: test_0008_won't update unless authorized ------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.554417"], ["updated_at", "2014-12-23 15:24:47.554417"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.557193"], ["updated_at", "2014-12-23 15:24:47.557193"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.559861"], ["updated_at", "2014-12-23 15:24:47.559861"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.562746"], ["updated_at", "2014-12-23 15:24:47.562746"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.568823"], ["updated_at", "2014-12-23 15:24:47.568823"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.573544"], ["updated_at", "2014-12-23 15:24:47.573544"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0009_must update if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.580186"], ["updated_at", "2014-12-23 15:24:47.580186"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.582904"], ["updated_at", "2014-12-23 15:24:47.582904"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.585585"], ["updated_at", "2014-12-23 15:24:47.585585"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.588796"], ["updated_at", "2014-12-23 15:24:47.588796"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:47.595213"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) Processing by Commontator::CommentsController#update as HTML Parameters: {"id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.4ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------------------------------- Commontator::CommentsController: test_0010_won't delete unless authorized and not deleted ----------------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.614947"], ["updated_at", "2014-12-23 15:24:47.614947"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.617775"], ["updated_at", "2014-12-23 15:24:47.617775"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.620844"], ["updated_at", "2014-12-23 15:24:47.620844"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.624195"], ["updated_at", "2014-12-23 15:24:47.624195"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.2ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.630546') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:47.630546"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:47.632606"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.641188"], ["updated_at", "2014-12-23 15:24:47.641188"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:47.643760"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------------ Commontator::CommentsController: test_0011_must delete if authorized and not deleted ------------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.678084"], ["updated_at", "2014-12-23 15:24:47.678084"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.680917"], ["updated_at", "2014-12-23 15:24:47.680917"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.683625"], ["updated_at", "2014-12-23 15:24:47.683625"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.686770"], ["updated_at", "2014-12-23 15:24:47.686770"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.691382') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:47.691382"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:47.692756"], ["id", 1]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.696512"], ["updated_at", "2014-12-23 15:24:47.696512"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.698889"], ["updated_at", "2014-12-23 15:24:47.698889"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:47.700941"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.703289') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:47.703289"], ["editor_id", 3], ["updated_at", "2014-12-23 15:24:47.704612"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:47.709015"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#delete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.711299') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:47.711299"], ["editor_id", 3], ["updated_at", "2014-12-23 15:24:47.712804"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------------------- Commontator::CommentsController: test_0012_won't undelete unless authorized and deleted --------------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.719332"], ["updated_at", "2014-12-23 15:24:47.719332"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.722264"], ["updated_at", "2014-12-23 15:24:47.722264"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.725311"], ["updated_at", "2014-12-23 15:24:47.725311"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.728608"], ["updated_at", "2014-12-23 15:24:47.728608"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.729767') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:47.729767"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:47.731202"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:47.739279"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1[0m [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.745513"], ["updated_at", "2014-12-23 15:24:47.745513"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.746326') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:47.746326"], ["editor_id", 3], ["updated_at", "2014-12-23 15:24:47.747684"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.752370"], ["updated_at", "2014-12-23 15:24:47.752370"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:47.755136"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.755974') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:47.755974"], ["updated_at", "2014-12-23 15:24:47.757224"], ["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] Completed 403 Forbidden in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------------------- Commontator::CommentsController: test_0013_must undelete if authorized and deleted ---------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.764505"], ["updated_at", "2014-12-23 15:24:47.764505"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.767218"], ["updated_at", "2014-12-23 15:24:47.767218"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.769992"], ["updated_at", "2014-12-23 15:24:47.769992"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.773270"], ["updated_at", "2014-12-23 15:24:47.773270"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.774468') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:47.774468"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:47.775895"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY "commontator_comments"."id" DESC LIMIT 1 [["thread_id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:47.781890"], ["id", 1]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.4ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.787287"], ["updated_at", "2014-12-23 15:24:47.787287"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:47.789743"], ["updated_at", "2014-12-23 15:24:47.789743"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.790672') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", "2014-12-23 15:24:47.790672"], ["updated_at", "2014-12-23 15:24:47.791893"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-12-23 15:24:47.795707"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:47.800323') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", "2014-12-23 15:24:47.800323"], ["editor_id", 2], ["updated_at", "2014-12-23 15:24:47.801793"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#undelete as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "deleted_at" = ?, "editor_id" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ? [["deleted_at", nil], ["editor_id", 3], ["updated_at", "2014-12-23 15:24:47.805600"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0014_won't upvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.812552"], ["updated_at", "2014-12-23 15:24:47.812552"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.814375"], ["updated_at", "2014-12-23 15:24:47.814375"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.816361"], ["updated_at", "2014-12-23 15:24:47.816361"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.818805"], ["updated_at", "2014-12-23 15:24:47.818805"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.828334"], ["updated_at", "2014-12-23 15:24:47.828334"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.1ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0015_must upvote if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.835467"], ["updated_at", "2014-12-23 15:24:47.835467"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.838333"], ["updated_at", "2014-12-23 15:24:47.838333"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.841143"], ["updated_at", "2014-12-23 15:24:47.841143"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.844393"], ["updated_at", "2014-12-23 15:24:47.844393"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.845841"], ["updated_at", "2014-12-23 15:24:47.845841"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:47.856597"], ["updated_at", "2014-12-23 15:24:47.856597"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 15ms (ActiveRecord: 0.7ms) [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "f"], ["updated_at", "2014-12-23 15:24:47.879234"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#upvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.1ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "t"], ["updated_at", "2014-12-23 15:24:47.886442"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::CommentsController: test_0016_won't downvote unless authorized --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.896846"], ["updated_at", "2014-12-23 15:24:47.896846"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.899966"], ["updated_at", "2014-12-23 15:24:47.899966"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.903003"], ["updated_at", "2014-12-23 15:24:47.903003"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.906508"], ["updated_at", "2014-12-23 15:24:47.906508"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.915497"], ["updated_at", "2014-12-23 15:24:47.915497"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::CommentsController: test_0017_must downvote if authorized ---------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.922397"], ["updated_at", "2014-12-23 15:24:47.922397"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.925304"], ["updated_at", "2014-12-23 15:24:47.925304"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.928329"], ["updated_at", "2014-12-23 15:24:47.928329"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.931683"], ["updated_at", "2014-12-23 15:24:47.931683"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.939838"], ["updated_at", "2014-12-23 15:24:47.939838"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:47.945415"], ["updated_at", "2014-12-23 15:24:47.945415"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.1ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ?[0m [["vote_flag", "t"], ["updated_at", "2014-12-23 15:24:47.963337"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#downvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.0ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL ORDER BY "votes"."id" DESC LIMIT 1 [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m UPDATE "votes" SET "vote_flag" = ?, "updated_at" = ? WHERE "votes"."id" = ? [["vote_flag", "f"], ["updated_at", "2014-12-23 15:24:47.969385"], ["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------- Commontator::CommentsController: test_0018_won't unvote unless authorized ------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:47.978541"], ["updated_at", "2014-12-23 15:24:47.978541"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:47.981329"], ["updated_at", "2014-12-23 15:24:47.981329"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:47.984355"], ["updated_at", "2014-12-23 15:24:47.984355"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:47.987706"], ["updated_at", "2014-12-23 15:24:47.987706"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 2], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:47.991063"], ["updated_at", "2014-12-23 15:24:47.991063"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.1ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.000905"], ["updated_at", "2014-12-23 15:24:48.000905"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 2ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------- Commontator::CommentsController: test_0019_must unvote if authorized -------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.008265"], ["updated_at", "2014-12-23 15:24:48.008265"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.011066"], ["updated_at", "2014-12-23 15:24:48.011066"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:48.013900"], ["updated_at", "2014-12-23 15:24:48.013900"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.017106"], ["updated_at", "2014-12-23 15:24:48.017106"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.018519"], ["updated_at", "2014-12-23 15:24:48.018519"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"], ["vote_flag", "t"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:48.021302"], ["updated_at", "2014-12-23 15:24:48.021302"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 1 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35mActsAsVotable::Vote Load (0.1ms)[0m SELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "votes" WHERE "votes"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 8ms (ActiveRecord: 0.6ms) [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[36mCommontator::Comment Load (0.0ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "votes" ("votable_id", "votable_type", "voter_id", "voter_type", "vote_flag", "vote_weight", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"], ["vote_flag", "f"], ["vote_weight", 1], ["created_at", "2014-12-23 15:24:48.043041"], ["updated_at", "2014-12-23 15:24:48.043041"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "cached_votes_down" = 1 WHERE "commontator_comments"."id" = ?[0m [["id", 1]] Processing by Commontator::CommentsController#unvote as HTML Parameters: {"id"=>"1"} [1m[35mCommontator::Comment Load (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[36mActsAsVotable::Vote Load (0.0ms)[0m [1mSELECT "votes".* FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."voter_id" = ? AND "votes"."voter_type" = ? AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"], ["voter_id", 3], ["voter_type", "DummyUser"]] [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "votes" WHERE "votes"."id" = ?[0m [["id", 2]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_up" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35mSQL (0.0ms)[0m UPDATE "commontator_comments" SET "cached_votes_down" = 0 WHERE "commontator_comments"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ?[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 7ms (ActiveRecord: 0.5ms) [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 't' AND "votes"."vote_scope" IS NULL [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "votes" WHERE "votes"."votable_id" = ? AND "votes"."votable_type" = ? AND "votes"."vote_flag" = 'f' AND "votes"."vote_scope" IS NULL[0m [["votable_id", 1], ["votable_type", "Commontator::Comment"]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ------------------------------------------------------------------------------ Commontator::CommentsController: test_0020_won't send mail if recipients empty ------------------------------------------------------------------------------ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.058089"], ["updated_at", "2014-12-23 15:24:48.058089"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.061117"], ["updated_at", "2014-12-23 15:24:48.061117"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:48.064146"], ["updated_at", "2014-12-23 15:24:48.064146"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.067479"], ["updated_at", "2014-12-23 15:24:48.067479"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.068976"], ["updated_at", "2014-12-23 15:24:48.068976"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:48.073681"], ["updated_at", "2014-12-23 15:24:48.073681"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction --------------------------------------------------------------------------------- Commontator::CommentsController: test_0021_must send mail if recipients not empty --------------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.080142"], ["updated_at", "2014-12-23 15:24:48.080142"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.082935"], ["updated_at", "2014-12-23 15:24:48.082935"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:48.085707"], ["updated_at", "2014-12-23 15:24:48.085707"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.088862"], ["updated_at", "2014-12-23 15:24:48.088862"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.090276"], ["updated_at", "2014-12-23 15:24:48.090276"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 1], ["created_at", "2014-12-23 15:24:48.096580"], ["updated_at", "2014-12-23 15:24:48.096580"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::CommentsController#create as HTML Parameters: {"thread_id"=>"1", "comment"=>{"body"=>"Something else"}} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:48.101251"], ["updated_at", "2014-12-23 15:24:48.101251"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ? [["thread_id", 1]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] Redirected to http://test.host/commontator/threads/1 Completed 302 Found in 6ms (ActiveRecord: 0.4ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------- Commontator::Subscription: test_0001_must count unread comments --------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.108882"], ["updated_at", "2014-12-23 15:24:48.108882"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.111801"], ["updated_at", "2014-12-23 15:24:48.111801"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:48.114754"], ["updated_at", "2014-12-23 15:24:48.114754"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 1 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("thread_id", "subscriber_id", "subscriber_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["thread_id", 1], ["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["created_at", "2014-12-23 15:24:48.117664"], ["updated_at", "2014-12-23 15:24:48.117664"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.117664')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.121799"], ["updated_at", "2014-12-23 15:24:48.121799"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.117664')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 1 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 1], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:48.126488"], ["updated_at", "2014-12-23 15:24:48.126488"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.117664')[0m [["thread_id", 1]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:24:48.129256' WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 1]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 1]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.129256') [["thread_id", 1]] [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.134231"], ["updated_at", "2014-12-23 15:24:48.134231"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 1]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 1 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 1], ["created_at", "2014-12-23 15:24:48.136029"], ["updated_at", "2014-12-23 15:24:48.136029"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------- Commontator::Comment: test_0001_must be votable if acts_as_votable is installed ------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.139547"], ["updated_at", "2014-12-23 15:24:48.139547"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.141126"], ["updated_at", "2014-12-23 15:24:48.141126"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.142949"], ["updated_at", "2014-12-23 15:24:48.142949"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------- Commontator::Comment: test_0002_must know if it has been modified ----------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.145547"], ["updated_at", "2014-12-23 15:24:48.145547"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.147095"], ["updated_at", "2014-12-23 15:24:48.147095"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.148806"], ["updated_at", "2014-12-23 15:24:48.148806"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.151159"], ["updated_at", "2014-12-23 15:24:48.151159"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 2], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:48.153328"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------- Commontator::Comment: test_0003_must know if it has been deleted ---------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.156224"], ["updated_at", "2014-12-23 15:24:48.156224"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.159098"], ["updated_at", "2014-12-23 15:24:48.159098"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.161993"], ["updated_at", "2014-12-23 15:24:48.161993"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" = '2014-12-23 15:24:48.163932') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.165773"], ["updated_at", "2014-12-23 15:24:48.165773"]] [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "deleted_at", "editor_type", "editor_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["deleted_at", "2014-12-23 15:24:48.163932"], ["editor_type", "DummyUser"], ["editor_id", 3], ["created_at", "2014-12-23 15:24:48.166786"], ["updated_at", "2014-12-23 15:24:48.166786"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "deleted_at" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["deleted_at", nil], ["updated_at", "2014-12-23 15:24:48.169570"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------- Commontator::Comment: test_0004_must make proper timestamps ----------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.172646"], ["updated_at", "2014-12-23 15:24:48.172646"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.175941"], ["updated_at", "2014-12-23 15:24:48.175941"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.178727"], ["updated_at", "2014-12-23 15:24:48.178727"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 2], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.181977"], ["updated_at", "2014-12-23 15:24:48.181977"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.184159"], ["updated_at", "2014-12-23 15:24:48.184159"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."id" != 1 AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_comments" SET "body" = ?, "editor_id" = ?, "editor_type" = ?, "updated_at" = ? WHERE "commontator_comments"."id" = ?[0m [["body", "Something else"], ["editor_id", 3], ["editor_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:48.186223"], ["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------ Commontator::SubscriptionsMailer: test_0001_must create deliverable mail ------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.332961"], ["updated_at", "2014-12-23 15:24:48.332961"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.335426"], ["updated_at", "2014-12-23 15:24:48.335426"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.337667"], ["updated_at", "2014-12-23 15:24:48.337667"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.338898"], ["updated_at", "2014-12-23 15:24:48.338898"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.341579"], ["updated_at", "2014-12-23 15:24:48.341579"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.343906"], ["updated_at", "2014-12-23 15:24:48.343906"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 2 AND "commontator_comments"."thread_id" = 2 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 2], ["creator_id", 2], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.346271"], ["updated_at", "2014-12-23 15:24:48.346271"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 3]] Rendered /Users/dante/Desktop/commontator/app/views/commontator/comments/_body.html.erb (1.0ms) Rendered /Users/dante/Desktop/commontator/app/views/commontator/subscriptions_mailer/comment_created.html.erb (2.2ms) Commontator::SubscriptionsMailer#comment_created: processed outbound mail in 13.4ms Sent mail to Undisclosed Recipients (2.8ms) Date: Tue, 23 Dec 2014 09:24:48 -0600 From: no-reply@dummy.com To: Undisclosed Recipients Message-ID: <5499894059501_49a3ff52e065bb8428@Dantes-MacBook-Pro.local.mail> Subject: Dummy User #2 posted a comment on DummyModel #2 Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bitSomething
Click here to view all comments on DummyModel #2.
[1m[35m (1.1ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m --------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0001_won't subscribe unless authorized --------------------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.371889"], ["updated_at", "2014-12-23 15:24:48.371889"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.380393"], ["updated_at", "2014-12-23 15:24:48.380393"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.382656"], ["updated_at", "2014-12-23 15:24:48.382656"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.390141"], ["updated_at", "2014-12-23 15:24:48.390141"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.6ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ---------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0002_must subscribe if authorized ---------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.398912"], ["updated_at", "2014-12-23 15:24:48.398912"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.401821"], ["updated_at", "2014-12-23 15:24:48.401821"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.404617"], ["updated_at", "2014-12-23 15:24:48.404617"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.411199"], ["updated_at", "2014-12-23 15:24:48.411199"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 6ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.0ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.419205"], ["updated_at", "2014-12-23 15:24:48.419205"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.0ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#subscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.426853"], ["updated_at", "2014-12-23 15:24:48.426853"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::SubscriptionsController: test_0003_won't unsubscribe unless authorized ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.433249"], ["updated_at", "2014-12-23 15:24:48.433249"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.436370"], ["updated_at", "2014-12-23 15:24:48.436370"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.439217"], ["updated_at", "2014-12-23 15:24:48.439217"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Subscription Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.442841"], ["updated_at", "2014-12-23 15:24:48.442841"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.1ms)[0m DELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? [["id", 1]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::SubscriptionsController: test_0004_must unsubscribe if authorized ------------------------------------------------------------------------------ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.455520"], ["updated_at", "2014-12-23 15:24:48.455520"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.459372"], ["updated_at", "2014-12-23 15:24:48.459372"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.461891"], ["updated_at", "2014-12-23 15:24:48.461891"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.465140"], ["updated_at", "2014-12-23 15:24:48.465140"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 1]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (1.6ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.474270"], ["updated_at", "2014-12-23 15:24:48.474270"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.484184"], ["updated_at", "2014-12-23 15:24:48.484184"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::SubscriptionsController#unsubscribe as HTML Parameters: {"thread_id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.0ms)[0m [1mDELETE FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35m (0.6ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m ---------------------------------------------------------------------- Commontator::ThreadsController: test_0001_won't show unless authorized ---------------------------------------------------------------------- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.493013"], ["updated_at", "2014-12-23 15:24:48.493013"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.495492"], ["updated_at", "2014-12-23 15:24:48.495492"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.498132"], ["updated_at", "2014-12-23 15:24:48.498132"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36m (0.4ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ----------------------------------------------------------------- Commontator::ThreadsController: test_0002_must show if authorized ----------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.505618"], ["updated_at", "2014-12-23 15:24:48.505618"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.508175"], ["updated_at", "2014-12-23 15:24:48.508175"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.510728"], ["updated_at", "2014-12-23 15:24:48.510728"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 5ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) Processing by Commontator::ThreadsController#show as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1 [["commontable_id", 2], ["commontable_type", "DummyModel"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.0ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] Redirected to http://test.host/dummy_models/2 Completed 302 Found in 3ms (ActiveRecord: 0.2ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction -------------------------------------------------------------------------------- Commontator::ThreadsController: test_0003_won't close unless authorized and open -------------------------------------------------------------------------------- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.531207"], ["updated_at", "2014-12-23 15:24:48.531207"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.533800"], ["updated_at", "2014-12-23 15:24:48.533800"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.536157"], ["updated_at", "2014-12-23 15:24:48.536157"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:48.541723"], ["updated_at", "2014-12-23 15:24:48.542565"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.0ms)[0m begin transaction --------------------------------------------------------------------------- Commontator::ThreadsController: test_0004_must close if authorized and open --------------------------------------------------------------------------- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.549921"], ["updated_at", "2014-12-23 15:24:48.549921"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.552786"], ["updated_at", "2014-12-23 15:24:48.552786"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.555535"], ["updated_at", "2014-12-23 15:24:48.555535"]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:48.558977"], ["closer_id", 2], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:48.560273"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:24:48.564798"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#close as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:48.566736"], ["updated_at", "2014-12-23 15:24:48.568064"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m ----------------------------------------------------------------------------------- Commontator::ThreadsController: test_0005_won't reopen unless authorized and closed ----------------------------------------------------------------------------------- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.573384"], ["updated_at", "2014-12-23 15:24:48.573384"]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.576566"], ["updated_at", "2014-12-23 15:24:48.576566"]] [1m[36mDummyModel Load (0.1ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.579389"], ["updated_at", "2014-12-23 15:24:48.579389"]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:48.580594"], ["updated_at", "2014-12-23 15:24:48.581667"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Completed 403 Forbidden in 1ms (ActiveRecord: 0.1ms) [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.0ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", nil], ["updated_at", "2014-12-23 15:24:48.588170"], ["id", 2]] [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1 Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 2ms (ActiveRecord: 0.1ms) [1m[36m (0.5ms)[0m [1mrollback transaction[0m [1m[35m (0.1ms)[0m begin transaction ------------------------------------------------------------------------------ Commontator::ThreadsController: test_0006_must reopen if authorized and closed ------------------------------------------------------------------------------ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.3ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.594724"], ["updated_at", "2014-12-23 15:24:48.594724"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.597601"], ["updated_at", "2014-12-23 15:24:48.597601"]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.600312"], ["updated_at", "2014-12-23 15:24:48.600312"]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:48.601515"], ["updated_at", "2014-12-23 15:24:48.602555"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:24:48.606665"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 5ms (ActiveRecord: 0.3ms) [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:48.610885"], ["updated_at", "2014-12-23 15:24:48.611779"], ["id", 2]] [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by Commontator::ThreadsController#reopen as HTML Parameters: {"id"=>"2"} [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35m (0.0ms)[0m SAVEPOINT active_record_1 [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."id" != 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.0ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:24:48.614689"], ["id", 2]] [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/commontator/threads/2 Completed 302 Found in 4ms (ActiveRecord: 0.2ms) [1m[35m (0.5ms)[0m rollback transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m -------------------------------------------------------------------- Commontator::ApplicationHelper: test_0001_must print javascript proc -------------------------------------------------------------------- [1m[35m (0.0ms)[0m rollback transaction [1m[36m (0.1ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.2ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.623488"], ["updated_at", "2014-12-23 15:24:48.623488"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.626804"], ["updated_at", "2014-12-23 15:24:48.626804"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 2]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 2 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 2], ["created_at", "2014-12-23 15:24:48.629204"], ["updated_at", "2014-12-23 15:24:48.629204"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 2) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.633267"], ["updated_at", "2014-12-23 15:24:48.633267"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.635019"], ["updated_at", "2014-12-23 15:24:48.635019"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 2 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 3) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2], ["created_at", "2014-12-23 15:24:48.638111"], ["updated_at", "2014-12-23 15:24:48.638111"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 2], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 2]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 3], ["subscriber_type", "DummyUser"], ["thread_id", 2]] [1m[36mCommontator::Thread Load (0.0ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 2]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.642424"], ["updated_at", "2014-12-23 15:24:48.642424"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.644573"], ["updated_at", "2014-12-23 15:24:48.644573"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 3]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 3 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 3], ["created_at", "2014-12-23 15:24:48.646204"], ["updated_at", "2014-12-23 15:24:48.646204"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 3 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 4) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3], ["created_at", "2014-12-23 15:24:48.649404"], ["updated_at", "2014-12-23 15:24:48.649404"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.649404') [["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 4 AND "commontator_comments"."thread_id" = 3 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 3], ["creator_id", 4], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.654324"], ["updated_at", "2014-12-23 15:24:48.654324"]] [1m[35m (0.7ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.1ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.649404') [["thread_id", 3]] [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1[0m [["subscriber_id", 4], ["subscriber_type", "DummyUser"], ["thread_id", 3]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_subscriptions" SET "updated_at" = '2014-12-23 15:24:48.658418' WHERE "commontator_subscriptions"."id" = ?[0m [["id", 3]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35mCommontator::Thread Load (0.0ms)[0m SELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [["id", 3]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 3]] [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND ("commontator_comments"."created_at" > '2014-12-23 15:24:48.658418') [["thread_id", 3]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.661571"], ["updated_at", "2014-12-23 15:24:48.661571"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.663711"], ["updated_at", "2014-12-23 15:24:48.663711"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 4]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 4 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 4], ["created_at", "2014-12-23 15:24:48.665314"], ["updated_at", "2014-12-23 15:24:48.665314"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 5) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 5], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["created_at", "2014-12-23 15:24:48.668641"], ["updated_at", "2014-12-23 15:24:48.668641"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.670295"], ["updated_at", "2014-12-23 15:24:48.670295"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Subscription Load (0.1ms)[0m SELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."subscriber_id" = ? AND "commontator_subscriptions"."subscriber_type" = ? AND "commontator_subscriptions"."thread_id" = ? ORDER BY "commontator_subscriptions"."id" ASC LIMIT 1 [["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 4]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Subscription Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_subscriptions" WHERE ("commontator_subscriptions"."thread_id" = 4 AND "commontator_subscriptions"."subscriber_type" = 'DummyUser' AND "commontator_subscriptions"."subscriber_id" = 6) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["subscriber_id", 6], ["subscriber_type", "DummyUser"], ["thread_id", 4], ["created_at", "2014-12-23 15:24:48.673380"], ["updated_at", "2014-12-23 15:24:48.673380"]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Subscription Load (0.1ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 4]] [1m[35mDummyUser Load (0.0ms)[0m SELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1 [["id", 5]] [1m[36mDummyUser Load (0.0ms)[0m [1mSELECT "dummy_users".* FROM "dummy_users" WHERE "dummy_users"."id" = ? LIMIT 1[0m [["id", 6]] [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.676291"], ["updated_at", "2014-12-23 15:24:48.676291"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.678354"], ["updated_at", "2014-12-23 15:24:48.678354"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 5]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 5], ["created_at", "2014-12-23 15:24:48.679953"], ["updated_at", "2014-12-23 15:24:48.679953"]] [1m[35m (0.8ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Comment Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 7 AND "commontator_comments"."thread_id" = 5 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["thread_id", 5], ["creator_id", 7], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.683129"], ["updated_at", "2014-12-23 15:24:48.683129"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."id" != 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["closed_at", "2014-12-23 15:24:48.684756"], ["closer_id", 7], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:48.685796"], ["id", 5]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 5], ["id", 2]] [1m[35mDummyModel Load (0.1ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 5], ["commontable_type", "DummyModel"]] [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1 [0m [["id", 5]] [1m[35mSQL (0.2ms)[0m UPDATE "commontator_threads" SET "commontable_id" = ?, "commontable_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["commontable_id", nil], ["commontable_type", nil], ["updated_at", "2014-12-23 15:24:48.690896"], ["id", 5]] [1m[36mCommontator::Thread Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 5 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_id", "commontable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_id", 5], ["commontable_type", "DummyModel"], ["created_at", "2014-12-23 15:24:48.692245"], ["updated_at", "2014-12-23 15:24:48.692245"]] [1m[36mCommontator::Subscription Load (0.0ms)[0m [1mSELECT "commontator_subscriptions".* FROM "commontator_subscriptions" WHERE "commontator_subscriptions"."thread_id" = ?[0m [["thread_id", 5]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ?[0m [["thread_id", 5], ["id", 2]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 5]] [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."commontable_id" = ? AND "commontator_threads"."commontable_type" = ? LIMIT 1[0m [["commontable_id", 5], ["commontable_type", "DummyModel"]] [1m[35mCommontator::Comment Exists (0.0ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? AND "commontator_comments"."id" = ? [["thread_id", 6], ["id", 2]] [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.696053"], ["updated_at", "2014-12-23 15:24:48.696053"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.698236"], ["updated_at", "2014-12-23 15:24:48.698236"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 6]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 6], ["created_at", "2014-12-23 15:24:48.699829"], ["updated_at", "2014-12-23 15:24:48.699829"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "closer_id" = ?, "closer_type" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", "2014-12-23 15:24:48.701309"], ["closer_id", 8], ["closer_type", "DummyUser"], ["updated_at", "2014-12-23 15:24:48.702222"], ["id", 7]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 6 AND "commontator_threads"."id" != 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m UPDATE "commontator_threads" SET "closed_at" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ? [["closed_at", nil], ["updated_at", "2014-12-23 15:24:48.704529"], ["id", 7]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.706131"], ["updated_at", "2014-12-23 15:24:48.706131"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.708187"], ["updated_at", "2014-12-23 15:24:48.708187"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 7]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 7 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 7], ["created_at", "2014-12-23 15:24:48.709729"], ["updated_at", "2014-12-23 15:24:48.709729"]] [1m[35m (0.6ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.711539"], ["updated_at", "2014-12-23 15:24:48.711539"]] [1m[36m (0.6ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.713643"], ["updated_at", "2014-12-23 15:24:48.713643"]] [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", 8]] [1m[36mCommontator::Thread Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 8 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["commontable_type", "DummyModel"], ["commontable_id", 8], ["created_at", "2014-12-23 15:24:48.715295"], ["updated_at", "2014-12-23 15:24:48.715295"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 9 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 9], ["creator_id", 10], ["creator_type", "DummyUser"], ["body", "Something"], ["created_at", "2014-12-23 15:24:48.718261"], ["updated_at", "2014-12-23 15:24:48.718261"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35m (0.0ms)[0m begin transaction [1m[36mCommontator::Comment Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "commontator_comments" WHERE ("commontator_comments"."body" = 'Something else' AND "commontator_comments"."creator_type" = 'DummyUser' AND "commontator_comments"."creator_id" = 10 AND "commontator_comments"."thread_id" = 9 AND "commontator_comments"."deleted_at" IS NULL) LIMIT 1[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "commontator_comments" ("thread_id", "creator_id", "creator_type", "body", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["thread_id", 9], ["creator_id", 10], ["creator_type", "DummyUser"], ["body", "Something else"], ["created_at", "2014-12-23 15:24:48.721255"], ["updated_at", "2014-12-23 15:24:48.721255"]] [1m[36m (0.7ms)[0m [1mcommit transaction[0m [1m[35mCommontator::Comment Load (0.2ms)[0m SELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? [["thread_id", 9]] [1m[36mCommontator::Comment Load (0.1ms)[0m [1mSELECT "commontator_comments".* FROM "commontator_comments" WHERE "commontator_comments"."thread_id" = ? ORDER BY created_at ASC[0m [["thread_id", 9]] [1m[35m (0.1ms)[0m begin transaction [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "dummy_users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2014-12-23 15:24:48.724615"], ["updated_at", "2014-12-23 15:24:48.724615"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mSQL (0.1ms)[0m INSERT INTO "dummy_models" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-23 15:24:48.726873"], ["updated_at", "2014-12-23 15:24:48.726873"]] [1m[36mDummyModel Load (0.0ms)[0m [1mSELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1[0m [["id", 9]] [1m[35mCommontator::Thread Exists (0.1ms)[0m SELECT 1 AS one FROM "commontator_threads" WHERE ("commontator_threads"."commontable_id" = 9 AND "commontator_threads"."commontable_type" = 'DummyModel') LIMIT 1 [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "commontator_threads" ("commontable_type", "commontable_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["commontable_type", "DummyModel"], ["commontable_id", 9], ["created_at", "2014-12-23 15:24:48.728534"], ["updated_at", "2014-12-23 15:24:48.728534"]] [1m[35m (0.7ms)[0m commit transaction [1m[36m (0.0ms)[0m [1mbegin transaction[0m [1m[35mDummyModel Load (0.0ms)[0m SELECT "dummy_models".* FROM "dummy_models" WHERE "dummy_models"."id" = ? LIMIT 1 [["id", nil]] [1m[36mSQL (0.1ms)[0m [1mUPDATE "commontator_threads" SET "commontable_id" = ?, "updated_at" = ? WHERE "commontator_threads"."id" = ?[0m [["commontable_id", nil], ["updated_at", "2014-12-23 15:24:48.730628"], ["id", 10]] [1m[35m (0.6ms)[0m commit transaction [1m[36mCommontator::Thread Load (0.1ms)[0m [1mSELECT "commontator_threads".* FROM "commontator_threads" WHERE "commontator_threads"."id" = ? LIMIT 1[0m [["id", 10]]